Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Aug : TClientSocket in a Thread - ongoing saga
| Subject: | TClientSocket in a Thread - ongoing saga |
| Posted by: | "Graham Powell" (grah..@deephaven.co.uk) |
| Date: | Tue, 28 Aug 2007 17:19:50 |
So now I have a Blocking TClientSocket running in a thread. The connection
is made to the server. So far so good. If the server, for whatever reaeon,
now wants to close the connection it uses:
MyServerSocket.Socket.Connections[n].Close;
I do not get an OnDisconnect event in the TClientSocket. This may not be
surprising, as it is a Blocking socket, but what should I do to detect the
connection has closed?
If the client socket closes the connection, the OnDisconnect event is
triggered.
Graham