summaryrefslogtreecommitdiff
path: root/docs/man/nng_sockaddr_inproc.5.adoc
blob: b65c3abed5bbb4fc98d4c7e8eae76b8711a83bac (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
= nng_sockaddr_inproc(5)
//
// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
// Copyright 2018 Capitar IT Group BV <info@capitar.com>
//
// This document is supplied under the terms of the MIT License, a
// copy of which should be located in the distribution where this
// file was obtained (LICENSE.txt).  A copy of the license may also be
// found online at https://opensource.org/licenses/MIT.
//

== NAME

nng_sockaddr_inproc - inproc socket address

== SYNOPSIS

[source, c]
----
#include <nng/nng.h>

enum sockaddr_family {
    NNG_AF_INPROC = 1,
};

typedef struct {
    uint16_t sa_family;
    uint16_t sa_name[128];
} nng_sockaddr_inproc;
----

== DESCRIPTION

(((socket, address, inproc)))
An `nng_sockaddr_inproc` is the flavor of <<nng_sockaddr.5#,`nng_sockaddr`>>
used to represent addresses associated with intra-process communication
using the <<nng_inproc.7#,_inproc_>> transport.

The following structure members are present:

`sa_family`::
    This field will always have the value ((`NNG_AF_INPROC`)).

`sa_name`::
    This field holds an arbitrary C string, which is the "`name`" of
    the address.
    The string must be `NUL` terminated, but no other restrictions exist.

TIP: In order to ensure maximum compatibility, applications should avoid
hard coding the sizeof the `sa_name` member explicitly, but use the
`sizeof` operator to determine its actual size at compile time.
Furthermore, the size is guaranteed to be at least 128.

== SEE ALSO

<<nng_sockaddr.5#,nng_sockaddr(5)>>,
<<nng_inproc.7#,nng_inproc(7)>>
<<nng.7#,nng(7)>>