Im programming a chat client and server. The server needs to know when the client has disconnected. I thought it would be enough for the server to check if the socket != null which I thought would occur when the client program was terminated, but this doesnt seem to work.
So which is the best way to check if the client has disconnected? Thanks in advance.