Decsription of SO_REUSEADDR is:
Sets SO_REUSEADDR for a socket. This is used only for MulticastSockets in java, and it is set by default for MulticastSockets.
Valid for: DatagramSocketImpl
However, the java.net.ServerSocket class and the java.net.Socket (that are not DatagramSocketImpl) have non-trivial method setReuseAddress()
It will be good to explain correlation between java.net.SocketOptions.SO_REUSEADDR and the original SO_REUSEADDR value. It seems that the original meaning of this option (setting this option allows to bind a socket to the same address multiple times) isn't applicable for java sockets.
Sets SO_REUSEADDR for a socket. This is used only for MulticastSockets in java, and it is set by default for MulticastSockets.
Valid for: DatagramSocketImpl
However, the java.net.ServerSocket class and the java.net.Socket (that are not DatagramSocketImpl) have non-trivial method setReuseAddress()
It will be good to explain correlation between java.net.SocketOptions.SO_REUSEADDR and the original SO_REUSEADDR value. It seems that the original meaning of this option (setting this option allows to bind a socket to the same address multiple times) isn't applicable for java sockets.
- duplicates
-
JDK-8329733 Update the documentation in java.net.SocketOptions to direct to java.net.StandardSocketOptions
-
- Resolved
-