Wrong return from java.net.Socket.isConnected()
843790Sep 12 2006 — edited Sep 12 2006Hi all,
I use javax.net.ssl package to transport some bytes over tcp. That works fine. But i m checking the connection before sending something from the server to the client and vice versa and that causes some problems. When i check the Socket-Connection before connecting it, i got:
isConnected() -> false
isBound() -> false
isClosed() ->true
after connecting i got:
isConnected() ->true
isBound() ->true
isClosed() ->false
when the opposit side closes the connection I still get:
isConnected() -> true
isBound() ->true
isClosed->false
but when i try to access the connection i get:
"Connection has been shutdown: javax.net.ssl.SSLException: java.net.SocketException: Connection reset" .
Why stays isConnected() true even if there is no more connection? Why stays isClosed() false even when there is no more open connection? Is this the correct behauviour or should I get something else?
Greetings
Jugan