RFR 8245194: Unix domain socket channel implementation

Jonas Konrad me at yawk.at
Fri Jul 3 11:58:25 UTC 2020


Hi,

 From looking at the JEP I can see that implementing abstract domain 
sockets (i.e. paths that start with a NUL byte) is not a goal at the 
moment. From what I can tell, with the current API this would fail in 
the Path.of step, which throws an Exception for NUL characters in the 
Path. Maybe this check should be moved up to UnixDomainSocketAddress, or 
at least be documented in some way – right now the fact that this fails 
looks more accidental.

- Jonas

On 6/18/20 4:31 PM, Michael McMahon wrote:
> Hi,
> 
> I'd like to start the review for JEP-380 (Unix Domain Socket Channels) 
> [1]. The first and smaller part of this JEP (8241305: Add protocol 
> specific factory creation methods to SocketChannel and 
> ServerSocketChannel) has already been integrated in JDK 15. This main 
> part of the JEP will hopefully be targeted to 16 under this bugid 
> (8245194 Unix Domain socket channel implementation [3])
> 
> The full webrev [4] touches a lot of files, so I have put the public API 
> change in a separate webrev at [5] and there is a specdiff at [6].
> 
> The implementation, while it touches a lot of files, is mostly about 
> re-factoring the existing SocketImpl and ServerSocketImpl implementation 
> classes into separate Inet and Unix variants, along with the new 
> implementation code for Unix domain.
> 
> Comments welcome on either the implementation or the API, although I 
> would like to concentrate on the API to start with as I expect the 
> review will have several iterations.
> 
> Regards,
> 
> Michael.
> 
> 
> [1] https://openjdk.java.net/jeps/380
> 
> [2] https://bugs.openjdk.java.net/browse/JDK-8241305
> 
> [3] https://bugs.openjdk.java.net/browse/JDK-8245194
> 
> [4] http://cr.openjdk.java.net/~michaelm/8245194/impl.webrev/webrev.1/
> 
> [5] http://cr.openjdk.java.net/~michaelm/8245194/api.webrev/webrev.1/
> 
> [6] 
> http://cr.openjdk.java.net/~michaelm/8245194/specdiff/specout.1/overview-summary.html
> 


More information about the nio-dev mailing list