AsynchronousSocketChannel.shutdownInput()

Alan Bateman Alan.Bateman at Sun.COM
Sat Aug 1 14:35:12 PDT 2009


Gili wrote:
> Hi,
>
> Just curious, what's the point of shutdownInput() and shutdownOutput() in
> AsynchronousSocketChannel? When would users want to shut them as opposed to
> closing the entire channel?
>
> Thanks,
> Gili
>   
The shutdown methods are required to support half-close semantics, 
important for TCP applications. As Alex said, you can use shutdownOutput 
to disable further write operations but the channel's socket can 
continue to receive data from the peer.

-Alan.



More information about the nio-discuss mailing list