RFR[8234148]: DatagramSocket.setOption/getOption/supportedOption should support multicast options
Patrick Concannon
patrick.concannon at oracle.com
Fri Dec 6 11:49:06 UTC 2019
Hi Vyom,
This check won't be run on Windows.
On Windows, the DualStackPlainDatagramSocketImpl implementation used for
DatagramSocket doesn’t support multicast, and at this time doesn’t
support multicast options either. So there is nothing to check on Windows.
We have plans to rework DatagramSocket and MulticastSocket to rely on
java.nio in the future, in which case that restriction might get lifted.
Note that this is also tied to JDK-8235141: 'Specify the required
standard socket options for the socket types in the java.net package'
(see https://bugs.openjdk.java.net/browse/JDK-8235185).
Kind regards,
Patrick
On 06/12/2019 09:15, Vyom Tewari26 wrote:
> Hi Patrick,
> Changes looks OK to me except, SupportedOptionsCheck tests
> if (!Platform.isWindows())
> 55 assertTrue(options.containsAll(multicastOptions));
> What this test will do on Windows ?.
> Thanks,
> Vyom
>
> ----- Original message -----
> From: Alan Bateman <Alan.Bateman at oracle.com>
> Sent by: "net-dev" <net-dev-bounces at openjdk.java.net>
> To: Daniel Fuchs <daniel.fuchs at oracle.com>, Patrick Concannon
> <patrick.concannon at oracle.com>, OpenJDK Network Dev list
> <net-dev at openjdk.java.net>
> Cc:
> Subject: [EXTERNAL] Re: RFR[8234148]:
> DatagramSocket.setOption/getOption/supportedOption should support
> multicast options
> Date: Fri, Dec 6, 2019 4:06 AM
> On 05/12/2019 16:01, Daniel Fuchs wrote:
> > This looks good to me Patrick.
> > With this fix multicast socket options can be set on DatagramSocket,
> > except on windows when the DualStackPlainDatagramSocketImpl is used.
> >
> > DualStackPlainDatagramSocketImpl.java:
> >
> > 246 if (isReusePortAvailable())
> > 247 options.add(StandardSocketOptions.SO_REUSEPORT);
> >
> > I believe you can remove these two lines as SO_REUSEPORT
> > is obviously not supported as per line 215.
> Good catch, otherwise looks good to me too.
>
> -Alan
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/net-dev/attachments/20191206/c04800b7/attachment.html>
More information about the net-dev
mailing list