>I'm working with a TCP Server using component Socket Server, When i
>disconnect a client, by removing it's cable for example, the port on the
>server stays opened. How can I detect that the client has disconnected.

The best way to do that is to handle it at the application level. Have your
client send a kind of "KeepAlive" or "noop" from time to time. You
TServerObject will then record in the ClientClass when the last command has
been received, being a normal command or just the KeepAlive or noop command.
Then periodiaclly, you iterate thru all clients to evaluate since how long
the didn't sent any command and just abort the corresponding connection.

Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)

To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to