Hello everybody,
I am developing a chat project to serve iOS, Android, WindowsPhone application,
I got bit problem:
How can server socket detect disconnected client???,
Explain:
1. when i used
java console, i click X button of windows then server socket detected disconnected client and i remove it in user online list
2. when i use client on cell phone application and i shutdown Wifi and 3G to disconnect server socket but server socket did not detect disconnected client.
How to solve this problem??
P/S: i can not use clientSocket.setSoTimeout() because client always connect to server socket, it only disconnect when network problem.