Anyone maintaining or know of a custom DatagramSocketImpl ?

Alan Bateman Alan.Bateman at oracle.com
Thu Dec 19 05:34:21 UTC 2019


On 18/12/2019 16:47, Chris Hegarty wrote:
> :
> Specifically on this point, the two-arg variants of `joinGroup` and
> `leaveGroup` throw an UnsupportedOperationException if invoked on a
> MulticastSocket that has a DatagramSocketImpl which was compiled against
> a pre-1.4 version of the DSI interface. ( these abstract methods were
> only added to the DSI interface in Java 1.4 )
>
That's right. There are also several setter/getter methods that require 
the impl to support socket options that were added in Java SE 1.4, e.g. 
setNetworkInterface requires the impl to support IP_MULTICAST_IF2, 
setLoopbackmode requires it to support IP_MULTICAST_LOOP. There are 
examples in DatagramSocket with methods such as setTrafficClass and 
setBroadcast. There's a lot more detail that we could go into, such as 
the changes to the FileDescriptor representation in JDK 5 but I think 
we've got enough here to conclude that dropping support for 
DatagramSocketImpl compiled with JDK 1.3 or older should not be a 
compatibility concern in 2019.

-Alan


More information about the net-dev mailing list