Casey Marshall wrote:
Hi.
A few of us were chatting in IRC today about local socket support, aka
Unix domain sockets, in Classpath (that is, where you bind a socket to
a special file, instead of to a network address. This is used mostly
for IPC; for example, local X11 connections can use local sockets). I
mentioned that I had written such a thing, and some people were
interested in seeing this in Classpath.
So, do we want this? The attached patch is my implementation of this,
which basically introduces three new classes:
gnu.java.net.local.LocalServerSocket
gnu.java.net.local.LocalSocket
gnu.java.net.local.LocalSocketAddress
Which operate similarly to how normal Sockets do, but over local sockets.
Note that this patch has to be cleaned up a lot, mostly to add
detection for local socket support in configure. Also, SocketChannel
support is missing, but may not be too hard to implement.
If there is interest, I can polish this up some more and check it in.
This would be great. I have already done a very simple UnixDomainSocket
implementation for some of our internal code. I am sure that having
this in classpath will save a lot of duplication of effort in this area.
David Daney.