Java socket API: How to tell if a connection has been closed?
There is no TCP API that will tell you the current state of the connection. isConnected() and isClosed() tell you the current state of your socket. Not the same thing. isConnected() tells you whether you have connected this socket. You have, so it returns true. isClosed() tells you whether you have closed this socket. Until … Read more