libuv already supports abstract sockets in uv_pipe_getsockname
Unfortunately, there is no way to connect to abstract socket with uv_pipe_connect.
I'm currently wrapping socat binary to be able to connect to abstract socket address from node-dbus client but it would make life so much easier if abstract socket would just work from core node.
Some my notes here: sidorares/abstractsocket#3
Few problems here:
Afaik python and ruby connect to abstract sockets using "\0name". At uv level allowing zero in socket name would require changing uv_pipe_connect signature (or adding very similar one like uv_pipe_connect2(req, handle, name, name_length, cb). Possible solution: encode leading zero somehow ( "@" prefix? do we want to allow non-abstract sockets to connect to "@name"? If so, how to escape it - "@@name"? ).
I have node version which is able to connect to socat abstract-listen:somename - server by doing net.connect('\0somename'). Would you be interested in PR? Is yes, which is preferred way - add name_length parameters where required or encode "\0" at js side and decode back at uv side ( by prefixing with @ for example )?