RFR 8216978: Drop support for pre JDK 1.4 SocketImpl implementations

Alan Bateman Alan.Bateman at oracle.com
Mon Apr 29 17:15:57 UTC 2019


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


More information about the net-dev mailing list