Hi Lucy,

I've just looked at the javadoc of MulticastSocket. It has this sentence:

     * When the socket is created the
     * {@link DatagramSocket#setReuseAddress(boolean)} method is
     * called to enable the SO_REUSEADDR socket option.

but it doesn't mention SO_REUSEPORT. Could you please add something
similar for SO_REUSEPORT:

     * When the socket is created and SO_REUSPORT is supported the
     * {@link DatagramSocket#setOption(...)} method is
     * called to enable the SO_REUSPORT socket option.

Thanks,
Volker


On Tue, Jan 5, 2016 at 2:19 PM, Alan Bateman <alan.bate...@oracle.com> wrote:
>
>
> On 04/01/2016 19:24, Volker Simonis wrote:
>>
>> On Mon, Jan 4, 2016 at 8:02 PM, Lu, Yingqi <yingqi...@intel.com> wrote:
>>>
>>> :
>>>
>>> 2. Regarding to the code snippet in net_util_md.c, the reason I check for
>>> ENOPROTOOPT is to enable SO_REUSEPORT in the situation that the feature is
>>> supported but something else happens during setsocksopts call. I totally
>>> agree this is much less safer than just disable the feature whenever the
>>> setsockopts returns error. Alan, please let me know what your take on this
>>> is. I can quick change it if you both think it is more appropriate to remove
>>> the ENOPROTOOPT check.
>>>
>> I just think we should play safe here. You also return JNI_FALSE when
>> the call to socket() just before the one to setsockopt() fails. But
>> lets here what's Alan's opinion.
>>
> I agree, it makes it simpler too.
>
> -Alan

Reply via email to