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