RFR 15 8243099: SO_INCOMING_NAPI_ID support

Alan Bateman Alan.Bateman at oracle.com
Tue May 12 07:50:31 UTC 2020


On 12/05/2020 08:34, Vyom Tiwari wrote:
> Hi Vladimir,
>
> Latest changes looks good to me, but i am not 100% sure if we need to 
> distinguish between "read only socket option" and "socket option not 
> supported" as below
>
> if (!incomingNapiIdOptSupported)
> + throw new UnsupportedOperationException("Attempt to set unsupported 
> option " + option);
> + else
> + throw new SocketException("Attempt to set read only option " + option);
> If developer wants to know the supported socket options he can use 
> "supportedOptions" to get the list of supported socket options.
You might need to go back through the full discussion thread on this 
point. The concern is that supportedOptions returns a set of socket 
options, no notion or distinction between read-only, write-only, or 
read-write options. Having setOption throw UOE when the socket option is 
supported could be confusing. We decided, in the discussion here, to 
align it with the other socket options that throw SocketException when 
they can not be set.

-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/net-dev/attachments/20200512/439384e7/attachment.htm>


More information about the net-dev mailing list