[zeromq-dev] IPC REQ/REP socket unavailable to other users?
Martin Sustrik
sustrik at imatix.com
Sat Aug 14 19:26:20 CEST 2010
Stewart Douglas wrote:
> The code I'm talking about sets up the socket for a connect or bind as
> shown below having first called socket in the normal way.
>
> struct sockaddr_un address;
> bzero(&address, sizeof(address));
> address.sun_family = AF_UNIX;
> strncpy(address.sun_path, localSocketName.c_str(),
> sizeof(address.sun_path));
should be address.sun_path + 1
>
> int length = sizeof(address.sun_family) + strlen(address.sun_path);
>
> // make sure we use an abstract name for the socket
> address.sun_path[0] = 0;
>
> if (::connect(theSocketFD, (struct sockaddr *)&address, length))
It looks like it's Linux specific. At least I haven't found anything
similar in POSIX specs.
So we can use abstract namespace instead of filesystem on Linux. The
question is: Can anybody imagine a situation where using filesystem
would be required?
Martin
More information about the zeromq-dev
mailing list