mcfunley/juds — Issue #6: Support for Linux abstract namespace.
Author: inoop
Created: 2012-01-11 15:58:58+00:00
State: open

First off, thanks for JUDS, it's really helpful.

I've slightly modified the code to support the Linux abstract namespace. In UnixDomainSocket.c, in the method sockaddr_init, I've added the following:

// Linux abstract namespace
if (socketFile[0]=='@')
sa->sun_path[0] = 0;

The following code connects to a domain socket in the abstract namespace:

UnixDomainSocketClient socket = new UnixDomainSocketClient("@some_socket" JUDS.SOCK_STREAM);
socket.getOutputStream().write("Ohai!".getBytes());
socket.close();

It might be nice to either merge this two-line fix, or perhaps support the abstract namespace in another way.