H
Hal Vaughan
I have a ServerSocket that creates a Socket with ServerSocket.accept(). I
then read data from that Socket's InputStream. I'm sending data to it with
netcat. When I stop netcat, there is no indication that I can see that the
connection is gone and netcat's client socket is gone. I've checked with
Socket.isClosed(), isConnected(), isOutputShutdown(), and
isInputShutdown(). There is no indication that this Socket is no longer
communicating with netcat, which isn't running.
How can I detect this change and shut the Socket when/if its counterpart
shuts down?
Thanks for any help!
Hal
then read data from that Socket's InputStream. I'm sending data to it with
netcat. When I stop netcat, there is no indication that I can see that the
connection is gone and netcat's client socket is gone. I've checked with
Socket.isClosed(), isConnected(), isOutputShutdown(), and
isInputShutdown(). There is no indication that this Socket is no longer
communicating with netcat, which isn't running.
How can I detect this change and shut the Socket when/if its counterpart
shuts down?
Thanks for any help!
Hal