how to check if a socket is still alive?
843790Jun 6 2006 — edited Jun 24 2006Hi everybody,
I'm using a java.net.Socket and I'm unable to check wether or not the other site has closed the connection.
socket.isClosed() seems to only check if I have closed the connection, not the other one.
socket.isConnected() seems to check if there ever has been a connection.
I've searched for an answer, but I only found the suggestion to send dummy data and see if it throws an exception.
Has anybody got a better solution?
Thanks in advance!