On 29/04/2019 17:47, Michael McMahon wrote:
:
It still ends up as a close of the socket's file descriptor at the OS
level
one way or the other. Closing a socket's InputStream or OutputStream
never resulted in a shutdown() call to the OS. If you want socket
shutdown
then you need to call shutdownInput() or shutdownOutput API on
j.n.Socket directly.
Right, I suspect David may have mis-read the discussion as it may not be
obvious that Socket::getInputStream and Socket::getOutputStream return
streams that implement close to close the Socket. One detail on shutdown
is that the close may shutdown the stream for writing as part of the
close. This is normal and long standing behavior for cases where
SO_LINGER has not been set.
-Alan