Skip to content

Support for Linux abstract namespace. #6

Description

@inoop

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions