summaryrefslogtreecommitdiff
path: root/man/tip/nng_inproc.7.html
blob: 235dddf317b3d7ab765ec88f1cacc6eeb435280f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
---
version: tip
layout: manpage_v2
title: nng_inproc(7)
---
<h1>nng_inproc(7)</h1>
<div class="sect1">
<h2 id="_name">NAME</h2>
<div class="sectionbody">
<div class="paragraph">
<p>nng_inproc - intra-process transport</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_synopsis">SYNOPSIS</h2>
<div class="sectionbody">
<div class="listingblock">
<div class="content">
<pre class="pygments highlight"><code data-lang="c"><span></span><span class="tok-cp">#include</span><span class="tok-w"> </span><span class="tok-cpf">&lt;nng/transport/inproc/inproc.h&gt;</span>

<span class="tok-kt">int</span><span class="tok-w"> </span><span class="tok-nf">nng_inproc_register</span><span class="tok-p">(</span><span class="tok-kt">void</span><span class="tok-p">);</span></code></pre>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_description">DESCRIPTION</h2>
<div class="sectionbody">
<div class="paragraph">
<p>

The <em>inproc</em> transport provides communication support between
sockets within the same process.
This may be used as an alternative
to slower transports when data must be moved within the same process.</p>
</div>
<div class="paragraph">
<p>This transport tries hard to avoid copying data, and thus is very
light-weight.</p>
</div>
<div class="sect2">
<h3 id="_registration">Registration</h3>
<div class="paragraph">
<p>This transport is generally built-in to the core, so
no extra steps to use it should be necessary.</p>
</div>
</div>
<div class="sect2">
<h3 id="_uri_format">URI Format</h3>
<div class="paragraph">
<p>
This transport uses URIs using the scheme <code>inproc://</code>, followed by
an arbitrary string of text, terminated by a <code>NUL</code> byte.</p>
</div>
<div class="paragraph">
<p>Multiple URIs can be used within the
same application, and they will not interfere with one another.</p>
</div>
<div class="paragraph">
<p>Two applications may also use the same URI without interfering with each
other, and they will be unable to communicate with each other using
that URI.</p>
</div>
</div>
<div class="sect2">
<h3 id="_socket_address">Socket Address</h3>
<div class="paragraph">
<p>When using an <a href="nng_sockaddr.5.html"><code>nng_sockaddr</code></a> structure,
the actual structure is of type
<a href="nng_sockaddr_inproc.5.html"><code>nng_sockaddr_inproc</code></a>.</p>
</div>
</div>
<div class="sect2">
<h3 id="_transport_options">Transport Options</h3>
<div class="paragraph">
<p>The <em>inproc</em> transport has no special options.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
While <em>inproc</em> accepts the option
<a href="nng_options.5.html#NNG_OPT_RECVMAXSZ"><code>NNG_OPT_RECVMAXSZ</code></a> for
compatibility, the value of the option is ignored with no enforcement.
As <em>inproc</em> peers are in the same address space, they are implicitly trusted,
and thus it makes no sense to spend cycles protecting a program from itself.
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_see_also">SEE ALSO</h2>
<div class="sectionbody">
<div class="paragraph text-left">
<p><a href="nng_inproc_register.3.html">nng_inproc_register(3)</a>,
<a href="nng_sockaddr_inproc.5.html">nng_sockaddr_inproc(5)</a>,
<a href="nng.7.html">nng(7)</a></p>
</div>
</div>
</div>