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

NAME

6       zmq_inproc - 0MQ local in-process (inter-thread) communication
7       transport
8

SYNOPSIS

10       The in-process transport passes messages via memory directly between
11       threads sharing a single 0MQ context.
12
13           Note
14           No I/O threads are involved in passing messages using the inproc
15           transport. Therefore, if you are using a 0MQ context for in-process
16           messaging only you can initialise the context with zero I/O
17           threads. See zmq_init(3) for details.
18

ADDRESSING

20       A 0MQ endpoint is a string consisting of a transport:// followed by an
21       address. The transport specifies the underlying protocol to use. The
22       address specifies the transport-specific address to connect to.
23
24       For the in-process transport, the transport is inproc, and the meaning
25       of the address part is defined below.
26
27   Assigning a local address to a socket
28       When assigning a local address to a socket using zmq_bind() with the
29       inproc transport, the endpoint shall be interpreted as an arbitrary
30       string identifying the name to create. The name must be unique within
31       the 0MQ context associated with the socket and may be up to 256
32       characters in length. No other restrictions are placed on the format of
33       the name.
34
35   Connecting a socket
36       When connecting a socket to a peer address using zmq_connect() with the
37       inproc transport, the endpoint shall be interpreted as an arbitrary
38       string identifying the name to connect to. Before version 4.0 he name
39       must have been previously created by assigning it to at least one
40       socket within the same 0MQ context as the socket being connected. Since
41       version 4.0 the order of zmq_bind() and zmq_connect() does not matter
42       just like for the tcp transport type.
43

EXAMPLES

45       Assigning a local address to a socket.
46
47           //  Assign the in-process name "#1"
48           rc = zmq_bind(socket, "inproc://#1");
49           assert (rc == 0);
50           //  Assign the in-process name "my-endpoint"
51           rc = zmq_bind(socket, "inproc://my-endpoint");
52           assert (rc == 0);
53
54       Connecting a socket.
55
56           //  Connect to the in-process name "#1"
57           rc = zmq_connect(socket, "inproc://#1");
58           assert (rc == 0);
59           //  Connect to the in-process name "my-endpoint"
60           rc = zmq_connect(socket, "inproc://my-endpoint");
61           assert (rc == 0);
62
63

SEE ALSO

65       zmq_bind(3) zmq_connect(3) zmq_ipc(7) zmq_tcp(7) zmq_pgm(7) zmq_vmci(7)
66       zmq(7)
67

AUTHORS

69       This page was written by the 0MQ community. To make a change please
70       read the 0MQ Contribution Policy at
71       http://www.zeromq.org/docs:contributing.
72
73
74
750MQ 4.3.4                         01/22/2022                     ZMQ_INPROC(7)
Impressum