1= nng_inproc(7)
2//
3// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech>
4// Copyright 2018 Capitar IT Group BV <info@capitar.com>
5//
6// This document is supplied under the terms of the MIT License, a
7// copy of which should be located in the distribution where this
8// file was obtained (LICENSE.txt).  A copy of the license may also be
9// found online at https://opensource.org/licenses/MIT.
10//
11
12== NAME
13
14nng_inproc - intra-process transport
15
16== SYNOPSIS
17
18[source,c]
19----
20#include <nng/transport/inproc/inproc.h>
21
22int nng_inproc_register(void);
23----
24
25== DESCRIPTION
26
27(((transport, _inproc_)))
28(((intra-process)))
29The ((_inproc_ transport)) provides communication support between
30sockets within the same process.
31This may be used as an alternative
32to slower transports when data must be moved within the same process.
33
34This transport tries hard to avoid copying data, and thus is very
35light-weight.
36
37=== Registration
38
39This transport is generally built-in to the core, so
40no extra steps to use it should be necessary.
41
42=== URI Format
43(((URI, `inproc://`)))
44This transport uses URIs using the scheme `inproc://`, followed by
45an arbitrary string of text, terminated by a `NUL` byte.
46
47Multiple URIs can be used within the
48same application, and they will not interfere with one another.
49
50Two applications may also use the same URI without interfering with each
51other, and they will be unable to communicate with each other using
52that URI.
53
54=== Socket Address
55
56When using an xref:nng_sockaddr.5.adoc[`nng_sockaddr`] structure,
57the actual structure is of type
58xref:nng_sockaddr_inproc.5.adoc[`nng_sockaddr_inproc`].
59
60=== Transport Options
61
62The _inproc_ transport has no special options.
63
64NOTE: While _inproc_ accepts the option
65xref:nng_options.5.adoc#NNG_OPT_RECVMAXSZ[`NNG_OPT_RECVMAXSZ`] for
66compatibility, the value of the option is ignored with no enforcement.
67As _inproc_ peers are in the same address space, they are implicitly trusted,
68and thus it makes no sense to spend cycles protecting a program from itself.
69
70== SEE ALSO
71
72[.text-left]
73xref:nng_inproc_register.3.adoc[nng_inproc_register(3)],
74xref:nng_sockaddr_inproc.5.adoc[nng_sockaddr_inproc(5)],
75xref:nng.7.adoc[nng(7)]
76