Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

unix: support abstract AF_UNIX addresses #797

Closed
geertj opened this issue May 11, 2013 · 3 comments
Closed

unix: support abstract AF_UNIX addresses #797

geertj opened this issue May 11, 2013 · 3 comments

Comments

@geertj
Copy link
Contributor

geertj commented May 11, 2013

The method uv_pipe_connect() takes the pipe name as a null-terminated string. This unfortunately prevents you from specifying abstract unix socket addresses. An abstract unix socket addres for "/tmp/foo" is specified as "\x00/tmp/foo" so exactly the same but starting with a null byte.

The abstract namespace is used by e.g. the D-BUS session bus which is where I need this for.

@bnoordhuis
Copy link
Contributor

Abstract socket addresses are a Linux-ism, I don't think we want to support that. If you need that functionality, you can create a socket manually and pass it to uv_pipe_open().

@geertj
Copy link
Contributor Author

geertj commented May 11, 2013

Arg.. I had hoped I would not have to bother with the details of non-blocking connect()s myself... But thanks for the tip regarding uv_pipe_open().

@bnoordhuis
Copy link
Contributor

No problem. FWIW, on Linux, as long as you turn on the O_NONBLOCK flag on the socket, you don't have to worry about dealing with EINPROGRESS: either the connect() syscall succeeds or it fails with EAGAIN (when the server's backlog is full) but there never is a 'partially done' state like there is with TCP sockets.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants