Catching a client disconnection...
I'm currently making a multi-threaded server, and i'm having trouble, while
inside a created thread to a specific client, in detect when the client disconnects.
I forced socket.close() and then asked for the client inetaddress (socket.getInetAddress())
and it's replyed the correct client address, my question is:
If the socket is already closed why is not retrivied something like null
or -1, so that i could detect the disconnected client?
Besides sending a message to the client and then try to cath Exception in
case the socket's already closed, is there any other way to do this?
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL