1NN_INPROC(7)                     nanomsg 1.1.5                    NN_INPROC(7)
2
3
4

NAME

6       nn_inproc - in-process transport mechanism
7

SYNOPSIS

9       #include <nanomsg/nn.h>
10
11       #include <nanomsg/inproc.h>
12

DESCRIPTION

14       In-process transport allows to send messages between threads or modules
15       inside a process. In-process address is an arbitrary case-sensitive
16       string preceded by inproc:// protocol specifier. All in-process
17       addresses are visible from any module within the process. They are not
18       visible from outside of the process.
19
20       The nature of in-process transport makes it easy to pass pointers
21       between threads instead of actual data. This is, however, considered a
22       bad application design and violates the scalable share-nothing
23       architecture. If you do pass pointers among threads, synchronising
24       thread access to shared data becomes your responsibility. Such design
25       also prevents moving the thread into different process or machine once
26       the need arises. As a rule of the thumb, don’t pass pointers among
27       threads unless you know what you are doing.
28
29       The overall buffer size for an inproc connection is determined by
30       NN_RCVBUF socket option on the receiving end of the connection.
31       NN_SNDBUF socket option is ignored. In addition to the buffer, one
32       message of arbitrary size will fit into the buffer. That way, even
33       messages larger than the buffer can be transfered via inproc
34       connection.
35

EXAMPLE

37           nn_bind (s1, "inproc://test");
38           nn_connect (s2, "inproc://test);
39

SEE ALSO

41       nn_ipc(7) nn_tcp(7) nn_bind(3) nn_connect(3) nanomsg(7)
42

AUTHORS

44       Martin Sustrik <sustrik@250bpm.com>
45
46
47
48                                  2021-01-26                      NN_INPROC(7)
Impressum