Description
The 2-arg joinGroup/leaveGroup methods are specified to use the interface set by setNetworkInterface (or setInterface) when invoked with netIf==null. These methods do not specify how they should behave when the outgoing interface for multicast datagrams has not been set. It would not be unreasonable for these methods to throw SocketException although this would be a small behavioral compatibility issue as the long standing (and unspecified behavior) has been to pick a random interface.
While in the area, the getNetworkInterface (and getInterface) do not specify what they return when an outgoing interface for multicast datagrams has not been set. The long standing behavior has been to return a "useless" network interface (or anyLocalAddress).
While in the area, the getNetworkInterface (and getInterface) do not specify what they return when an outgoing interface for multicast datagrams has not been set. The long standing behavior has been to return a "useless" network interface (or anyLocalAddress).
Attachments
Issue Links
- blocks
-
JDK-8230211 Prepare DatagramSocket for alternative DatagramSocketImpl
-
- Resolved
-
- csr for
-
JDK-8235423 MulticastSocket joinGroup/leaveGroup do not specify their behavior when the outgoing interface has not been set
-
- Closed
-
- is blocked by
-
JDK-8233307 MulticastSocket getOption(IP_MULTICAST_IF) returns interface when not set
-
- Closed
-