Luis
Luis

Reputation: 738

What does '@' mean in a ZeroMQ endpoint?

I have been looking at the ZeroMQ documentation and I haven't seen the endpoint syntax specified anywhere. I was wondering what something like this meant in ZeroMQ:

socket.bind("ipc://@shared");

I know that IPC is the transport, but I don't know what the '@' means. The rest should be the filename, for the Unix Domain Socket. But I cannot see any file with that name.

Upvotes: 2

Views: 443

Answers (2)

jamesdillonharvey
jamesdillonharvey

Reputation: 1042

The @ signifies the connection should use the "Abstract Namespace" rather than the filesystem/filepath.

This removes the need for the filesystem path to exist or issues with permissions, the name is globally available to connect/bind to and will clean itself up when all references are removed.

It's a linux only concept.

Upvotes: 3

artemis
artemis

Reputation: 7281

It specifies a local path corresponding to that IP.

Take the following for example. Let's say you are trying to bind to MY address, which is somewhere on the network 192.168.0.0

You could write: socket.bind("192.168.0.0:@tkelly")

Alternatively, the @ can mean a specific path. If you are using ZMQ for other things such as copying a file, you could do something like scp <filea> [email protected]

Upvotes: 1

Related Questions