1ZMQ_IPC(7)                        0MQ Manual                        ZMQ_IPC(7)
2
3
4

NAME

6       zmq_ipc - 0MQ local inter-process communication transport
7

SYNOPSIS

9       The inter-process transport passes messages between local processes
10       using a system-dependent IPC mechanism.
11
12           Note
13           The inter-process transport is currently only implemented on
14           operating systems that provide UNIX domain sockets.
15

ADDRESSING

17       A 0MQ endpoint is a string consisting of a transport:// followed by an
18       address. The transport specifies the underlying protocol to use. The
19       address specifies the transport-specific address to connect to.
20
21       For the inter-process transport, the transport is ipc, and the meaning
22       of the address part is defined below.
23
24   Binding a socket
25       When binding a socket to a local address using zmq_bind() with the ipc
26       transport, the endpoint shall be interpreted as an arbitrary string
27       identifying the pathname to create. The pathname must be unique within
28       the operating system namespace used by the ipc implementation, and must
29       fulfill any restrictions placed by the operating system on the format
30       and length of a pathname.
31
32       When the address is wild-card *, zmq_bind() shall generate a unique
33       temporary pathname. The caller should retrieve this pathname using the
34       ZMQ_LAST_ENDPOINT socket option. See zmq_getsockopt(3) for details.
35
36           Note
37           any existing binding to the same endpoint shall be overridden. That
38           is, if a second process binds to an endpoint already bound by a
39           process, this will succeed and the first process will lose its
40           binding. In this behaviour, the ipc transport is not consistent
41           with the tcp or inproc transports.
42
43           Note
44           the endpoint pathname must be writable by the process. When the
45           endpoint starts with /, e.g., ipc:///pathname, this will be an
46           absolute pathname. If the endpoint specifies a directory that does
47           not exist, the bind shall fail.
48
49           Note
50           on Linux only, when the endpoint pathname starts with @, the
51           abstract namespace shall be used. The abstract namespace is
52           independent of the filesystem and if a process attempts to bind an
53           endpoint already bound by a process, it will fail. See unix(7) for
54           details.
55
56           Note
57           IPC pathnames have a maximum size that depends on the operating
58           system. On Linux, the maximum is 113 characters including the
59           "ipc://" prefix (107 characters for the real path name).
60
61   Unbinding wild-card address from a socket
62       When wild-card * endpoint was used in zmq_bind(), the caller should use
63       real endpoint obtained from the ZMQ_LAST_ENDPOINT socket option to
64       unbind this endpoint from a socket using zmq_unbind().
65
66   Connecting a socket
67       When connecting a socket to a peer address using zmq_connect() with the
68       ipc transport, the endpoint shall be interpreted as an arbitrary string
69       identifying the pathname to connect to. The pathname must have been
70       previously created within the operating system namespace by assigning
71       it to a socket with zmq_bind().
72

EXAMPLES

74       Assigning a local address to a socket.
75
76           //  Assign the pathname "/tmp/feeds/0"
77           rc = zmq_bind(socket, "ipc:///tmp/feeds/0");
78           assert (rc == 0);
79
80       Connecting a socket.
81
82           //  Connect to the pathname "/tmp/feeds/0"
83           rc = zmq_connect(socket, "ipc:///tmp/feeds/0");
84           assert (rc == 0);
85
86

SEE ALSO

88       zmq_bind(3) zmq_connect(3) zmq_inproc(7) zmq_tcp(7) zmq_pgm(7)
89       zmq_vmci(7) zmq_getsockopt(3) zmq(7)
90

AUTHORS

92       This page was written by the 0MQ community. To make a change please
93       read the 0MQ Contribution Policy at
94       http://www.zeromq.org/docs:contributing.
95
96
97
980MQ 4.3.4                         07/23/2022                        ZMQ_IPC(7)
Impressum