Closed jeanparpaillon closed 10 years ago
For an abstract socket, everything after the '\0' is considered to be part of the path. So, unlike a normal unix socket with a path on the file system, the sockaddr struct shouldn't be padded:
{ok, Socket} = procket:socket(1,1,0),
Name = <<"/tmp/foo">>,
Sun = <<1:16/native, 0, Name/binary>>,
procket:connect(Socket, Sun).
Ok, got it. Thanks
Hi, I am using unix domain socket in the code below: https://github.com/lizenn/erlang-dbus/blob/master/src/dbus_transport_unix.erl
When connecting to an abstract UNIX domain socket, I get econnrefused. UNIX domain socket with real path are ok.
I've traced procket.c and the sockaddr_un structure thinks ok (with leading '\0' before path).
Any clue to check where it may come from ?
Regards, Jean