RFR 8245194: Unix domain socket channel implementation
Alan Bateman
Alan.Bateman at oracle.com
Sat Sep 12 16:44:55 UTC 2020
On 11/09/2020 16:55, Michael McMahon wrote:
>
> On 11/09/2020 15:46, Alan Bateman wrote:
>> On 26/08/2020 15:24, Michael McMahon wrote:
>>> :
>>>
>>> There is a fair bit of other refactoring and simplification done
>>> also. Next version is at:
>>>
>>> http://cr.openjdk.java.net/~michaelm/8245194/impl.webrev/webrev.9/
>> I realise this has moved to a PR but I'm still working through some
>> of the areas that are touched in this patch.
>>
>> Switching the Pipe implementation to use a Unix domain socket on
>> Windows is good but it looks like it will try to create a Unix domain
>> socket every time, even on editions of Windows that don't support it.
>> Can this be changed to try once and fallback to the existing loopback
>> connection approach thereafter? Minor nits here but "getServer"
>> returns a listener socket so needs a better name. Also in the
>> SinkChannelImpl then it would be better to keep the layout consistent
>> and put setNoDelay at the end rather than before the constructor.
>>
> Good points. Would getListener be okay instead of getServer?
Or createListener as that better describes what it does. One thing I'm
wondering about is adding a new constructor to the Windows PipeImpl with
a flag to indicate if it should not buffer, meaning Nagle is disabled
when it does a loopback connection. That would avoid the need for
setNoDelay in the Windows Selector code, a welcome cleanup that we'll
need to do anyway once we have another Selector implementation for this
platform.
-Alan
More information about the nio-dev
mailing list