A new socket implementation / api

Noctarius me at noctarius.com
Mon Aug 22 21:15:17 PDT 2011


Am 22.08.2011 22:39, schrieb Alan Bateman:
> 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.

Hi Alan,

it's nice to see that there was some internal discussions at SUN
back than. Are there any plans at Oracle?

To the technical part:
I would prefer the SocketAddress type which is equivalent to the C
apis for socket programing and so the api changes would be minimal.
There needs to be an constructor for sockets to get the
SocketAddress to build up the internal socket.

There were changes for Java 7 to implement some new protocol stuff
or am I wrong? Does someone has the JSR number?

If there is interest I would try to write an JSR for the socket
changes in hope that someone will help out if I have questions :).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6393 bytes
Desc: S/MIME Cryptographic Signature
Url : http://mail.openjdk.java.net/pipermail/nio-discuss/attachments/20110823/e239dd1b/attachment.bin 


More information about the nio-discuss mailing list