Detecting unexpectedly closed sockets

Tomas Franzén tomas at lightheadsw.com
Fri Oct 15 18:13:26 EDT 2004


Hi,

I work on a project where a bunch of clients connect to the same 
server. The server needs to keep track of which users are connected.
The server adds the address of the client to a list when connected, and 
removes it when disconnected. I can easily track connections using the 
callback message of the accept command, and disconnections using the 
socketClosed message. However, how do I detect when a client 
unexpectedly loses its connection?
It seems that the sockets stay open even if one unplugs the network 
cable for a while, and such.

Do the server need to "manually" send some kind of reoccurring message 
to the client, and wait for an answer, to verify the connection?
My tests were done using Windows 2000 Pro.

Thanks.

Tomas Franzén
Lighthead Software
http://www.lightheadsw.com/

I'm listening to Prodigy - The Way It Is 


More information about the use-livecode mailing list