aboutsummaryrefslogtreecommitdiff
path: root/docs/ref/tran
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-10-11 23:54:19 -0700
committerGarrett D'Amore <garrett@damore.org>2024-10-11 23:54:19 -0700
commit522293fc3c121af6189bdca0b4285c03118d9cd6 (patch)
tree1759e3a9c98d17ade73452084db5afb3a3d1fda7 /docs/ref/tran
parent83d487d113808d271c38d677ed00dd9ddd55a9b0 (diff)
downloadnng-522293fc3c121af6189bdca0b4285c03118d9cd6.tar.gz
nng-522293fc3c121af6189bdca0b4285c03118d9cd6.tar.bz2
nng-522293fc3c121af6189bdca0b4285c03118d9cd6.zip
Convert inproc doc to mdbook.
Diffstat (limited to 'docs/ref/tran')
-rw-r--r--docs/ref/tran/index.md1
-rw-r--r--docs/ref/tran/inproc.md50
2 files changed, 51 insertions, 0 deletions
diff --git a/docs/ref/tran/index.md b/docs/ref/tran/index.md
index 8cefa14b..aa5b2ada 100644
--- a/docs/ref/tran/index.md
+++ b/docs/ref/tran/index.md
@@ -3,4 +3,5 @@
This section documents transports for Scalabity Protocols implemented by NNG.
- [BSD Socket](socket.md)
+- [Intra-Process Transport](inproc.md)
- [UDP](udp.md)
diff --git a/docs/ref/tran/inproc.md b/docs/ref/tran/inproc.md
new file mode 100644
index 00000000..9c0f917d
--- /dev/null
+++ b/docs/ref/tran/inproc.md
@@ -0,0 +1,50 @@
+# INPROC Transport
+
+The {{i:*inproc* transport}}{{hi:*inproc*}}{{i:intra-process}} 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.
+
+This transport tries hard to avoid copying data, and thus is very
+light-weight.
+
+## URI Format
+
+This transport uses URIs using the scheme {{i:`inproc://`}}, followed by
+an arbitrary string of text, terminated by a `NUL` byte.
+
+Multiple URIs can be used within the
+same application, and they will not interfere with one another.
+
+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.
+
+## Socket Address
+
+When using an [`nng_sockaddr`][sockaddr] structure,
+the actual structure is of type
+[`nng_sockaddr_inproc`][sockaddr_inproc].
+
+## Transport Options
+
+The _inproc_ transport has no special options.
+
+> [!NOTE]
+> While _inproc_ accepts the option `NNG_OPT_RECVMAXSZ` for
+> compatibility, the value of the option is ignored with no enforcement.
+> As _inproc_ peers are in the same address space, they are implicitly
+> trusted, so the protection afforded by `NNG_OPT_RECVMAXSZ` is unnecessary.
+
+## Mixing Implementations
+
+When mixing the _NNG_ library with other implementations of these
+protocols in the same process (such as the _mangos_
+or _libnanomsg_ implementations), it will not be possible to utilize
+the _inproc_ transport to communicate across this boundary.
+
+This limitation also extends to using different instances of the _NNG_
+library within the same process.
+
+[sockaddr]: TODO.md
+[sockaddr_inproc]: TODO.md