Hi...

Quote:
>When you don't assign the LocalPort, Windows automatically assign an 
>available local port. This is usually what is done for connecting to a 
>remote host. If you have any reason not to do so, just explain why.


If I use this code:
TheTCPClientSocket->Addr         = TCP_ClientAddress;
TheTCPClientSocket->Proto      = "tcp";
TheTCPClientSocket->Port         = TCP_ClientPort;
TheTCPClientSocket->LocalPort  = TCP_ClientPort;
TheTCPClientSocket->Connect();

Then I can connect OK, but the second time I connect I get the 10048 if done
a few seconds after I close the connection
        - if I wait 1 minute after I disconnect and then reconnect, all is
OK


If I use this code:
TheTCPClientSocket->Addr         = TCP_ClientAddress;
TheTCPClientSocket->Proto      = "tcp";
TheTCPClientSocket->Port         = TCP_ClientPort;
TheTCPClientSocket->Connect();

Then I can connect, disconnect and then reconnect many times over a 1 minute
period

=======
So This leads me to think that TWSocket is not closing/freeing/de-allocating
the LocalPort, such that when I try to reopen the connection a few seconds
after I close it, windows raises the 10048 error due to the LocalPort still
being allocated

Is this the case ????

This is the code called when I want to close the Client connection
TheTCPClientSocket->Close();


Is there something else I need to call ??   


Thanks
Ray

--
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

Reply via email to