I have got to the bottom of the Error 10048

This means the port you are trying to use is already used and thus is no more available.

It seems that the order in witch you assign values to the TWSocket
properties when you want to open a client is important
  - so now I can open and close the client heaps of times with out the
error 10048 being raised :-)

The code I was using looked like this

TheTCPClientSocket->Proto     = "tcp";
TheTCPClientSocket->Port    = TCP_ClientPort;
TheTCPClientSocket->Addr    = TCP_ClientAddress;
TheTCPClientSocket->LocalPort = TCP_ClientPort;
TheTCPClientSocket->LocalAddr = "0.0.0.0";
TheTCPClientSocket->Connect();


The correct code that works looks like this

TheTCPClientSocket->Addr    = TCP_ClientAddress;
TheTCPClientSocket->Proto     = "tcp";
TheTCPClientSocket->Port    = TCP_ClientPort;
TheTCPClientSocket->Connect();

Does anyone know why this is the case ???

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.

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

Reply via email to