Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Apr : Client Disconnect from Server App that is not running - Sorry Remy - Another One
| Subject: | Client Disconnect from Server App that is not running - Sorry Remy - Another One |
| Posted by: | "PeaShooter_OMO" (jacquesv..@homemail.co.za) |
| Date: | Tue, 17 Apr 2007 12:06:29 |
I am testing possible broken connection scenarios...
I have a Server App with TidTCPServer running and accepting connections from
TidTCPClient.
After a client has connected I end the Server App by using Win Task Manager
and ending its process.
Now I call TCpCLient.Disconnect, once or twice even and then start the
Server App again.
The problem now is that when I TCPClient.Connect again from the same
client app it will indicate that it is connected but the Server will not
show that it received a connection.
It seems to me that the first instance of the Server App has opened sockets
and they were not closed because I ended that App's process without closing
the app properly and now the Client is connected to those sockets and not
the new instance of the Server.
Is this the case and if so what must I do to reinitialize those sockets when
I run the Server App, so that the Client will connect to the new instance of
the Server App?
Thank you