A new socket implementation / api

Alan Bateman Alan.Bateman at oracle.com
Mon Aug 22 13:39:06 PDT 2011


Noctarius wrote:
> Hi guys
>
> Since I came at the point where I want to support Windows Named
> Pipes and Unix Domain Sockets in some project I implemented them by
> using JNA. That seems to work nice but it's sad to see that the
> Socket classes in Java are designed extremly internet protocol
> driven and not as generic as it would be possible to support more
> types of sockets.
>
> I came to the idea (and I guess there are a bunch of other people
> out there had the same) to define a JSR for building a new socket
> framework. Maybe it could be done by using nio but I'm not in deeper
> thoughts about it at this point.
>
> With this mail I would like to see if there's interest in having os
> depending features like domain sockets or native pipes directly
> build in Java and if there's interest in helping with definition and
> implementation (if there will a JSR later on).
>
> Like I said at the moment there are only basic ideas / thoughts how
> such a new socket framework would look like and I'm glad to retrieve
> any idea or statement about it.
>
> Since I have no experience in driving a JSR as speclead it would be
> nice if someone else with experience would do the job :)
>
> Greetings from Germany,
> Chris
>
>   
This is something we prototyped in Sun a while back. The API changes 
weren't extensive, and mostly just added static factory methods so that 
the protocol family and protocol could be specified when creating the 
SocketChannel (or ServerSocketChannel). The other part to it was an 
alternative SocketAddress type to support the file path. We didn't take 
it so far but at some point I agree we should include Unix domain 
sockets / named pipe support in the platform.

-Alan.


More information about the nio-discuss mailing list