Hi, >> What would be the reason(s) that I am not able to do the same thing with >> this new device? Error 10049 says I cannot bind to the remote address.
>Because you call listen ! I am calling Connect. Using UDP, I have another application, I set the addr property to the remote IP address, set the port number, call connect, use send to transmit the bytes and OnDataAvaliable to get the reply and all works fine. Now, different remote device, I do the same as the above paragraph and I get error 10049 when I call connect. I am trying to understand what is causing the error. The remote device will not send me any data until I request it. So, I am not sitting with a port listening for an incoming connection. What am I not understanding, in one device I can use UDP/Connect and it works. Another device I get an error 10049 when I call connect. I understand why I get the 10049 error on listen. Makes total since. So, with UDP LocalAddr is not used. Cheers, Mark -----Original Message----- From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On Behalf Of Francois PIETTE Sent: Wednesday, March 24, 2010 1:49 PM To: ICS support mailing Subject: Re: [twsocket] UDP... >> ...originating only from that interface. > > I have done that kind of binding before using LocalAddr. I assume it would > be the same property for UDP. No, that is different. Actually a socket has two ends: one local and one remote. Each has his IP an port number. When you use a socket for listening incomming connection, the Addr property is used to specify the interface IP address which is used to accept incomming connections, 0.0.0.0 is a special case saying the socket to accept connections from any one of the interfaces installed in the computer. For an outgoing connection, the localaddr property is used to specific the interface to use for having the connection going out of the computer while the Addr property is used for the remote address. > OK. I have another application where I am using UDP and I set the addr > property to the remote IP address. Then I call connect, use send and > OnDataAvaliable and all works fine. This is an outgoing socket. That is different than listening. As I saif above, for an outgoing (client) socket, the addr property designated the remote address to conect to. UDP is a special case where there is no real "connection" as you have with TCP. To have a universal interface in TWSocket, I use the connect method to bind the socket to the parameters given by the properties. > What would be the reason(s) that I am not able to do the same thing with > this new device? Error 10049 says I cannot bind to the remote address. Because you call listen ! > What does the connect call, using UDP, send to the remote that > caused the 10049 on one device and not others? I am so confused. ;) Me too. I'm not sure I understand your description. -- francois.pie...@overbyte.be The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be