> I am using the TWSocketServer (Server) component to which several TWSocket
> components connect (Client),
> I successfully capture the event when the client gets disconnected
> however I am running into a problem in the case where a client is
> abnormally terminated, user ends task in task manager.
> How can my TWSocketServer component know that the client is not there
> anymore ?
> I cannot do a ping because several clients might display the same ip (NAT)
>
> Any help would be greatly appreciated -

The only real solution is to implement a kind of ping in your application. 
The client periodically send a ping (not ICMP, just a kind of message) to 
the server using the connection. The server evaluate a timeout and 
disconnect any client not having sent their ping.

Also you can implement a simple timeout: if a client has no sent any command 
or data for a given time, the server disconnect automatically. How to 
implement that depends on your application. There is no rule !

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