There's no support for the "half open" modes of sockets, where one
can write (but not read) or read (but not write).
So for example, if you get the input stream of a socket and close()
it, that closes the socket and the output stream. Similarly for the
case of initially closing the output stream.
The RFE is that since most "normal" sockets support the ability to
close one side of the socket, but not the other (i.e. "normal" being
"what you can do with the Berkeley C sockets API), so should Java
sockets offer this feature.
Lack of this functionality prevents certain kinds of application
protocols from working. Specifically, ones which work to ensure
delivery of all application data before terminating connections.
can write (but not read) or read (but not write).
So for example, if you get the input stream of a socket and close()
it, that closes the socket and the output stream. Similarly for the
case of initially closing the output stream.
The RFE is that since most "normal" sockets support the ability to
close one side of the socket, but not the other (i.e. "normal" being
"what you can do with the Berkeley C sockets API), so should Java
sockets offer this feature.
Lack of this functionality prevents certain kinds of application
protocols from working. Specifically, ones which work to ensure
delivery of all application data before terminating connections.
- duplicates
-
JDK-4035663 Sockets can not successfully close one side while continuing to use the other
-
- Resolved
-
- relates to
-
JDK-4118434 java.net.Socket specification flaw: close behaviour
-
- Closed
-