From 6274913455be87cbe598b5d0534e1e80972c8efd Mon Sep 17 00:00:00 2001 From: gdamore Date: Tue, 28 Oct 2025 05:39:18 +0000 Subject: deploy: 1d69c8f0393337d4f222cc1af1af813d77922c84 --- ref/tran/ipc.html | 15 +++++++-------- ref/tran/udp.html | 4 +--- 2 files changed, 8 insertions(+), 11 deletions(-) (limited to 'ref/tran') diff --git a/ref/tran/ipc.html b/ref/tran/ipc.html index c125def1..60073f98 100644 --- a/ref/tran/ipc.html +++ b/ref/tran/ipc.html @@ -271,7 +271,7 @@ relative to the root directory.

note

When using relative paths on POSIX systems, the address used and returned -in properties like NNG_OPT_LOCADDR will also be relative. +in functions such as nng_pipe_peer_addr will also be relative. Consequently, they will only be interpreted the same by processes that have the same working directory. To ensure maximum portability and safety, absolute paths are recommended @@ -296,14 +296,15 @@ longer than 128 bytes, including the ipc:// prefix.

Abstract sockets use a URI-encoded name after the abstract:// scheme, which allows arbitrary values to be conveyed in the path, including embedded NUL bytes. For example, the name "a\0b" would be represented as abstract://a%00b.

-
+

- tip + note

-

An empty name may be used with a listener to request “auto bind” be used to select a name. -In this case the system will allocate a free name. -The name assigned may be retrieved using NNG_OPT_LOCADDR.

+

NNG no longer supports “auto binding” where the kernel allocates a random unused name. +A simple solution to this is to allocate a large random number, such as a random UUID +or a concatenation of four random values from nng_random. The chance of a collision +can be made arbitrarily small by appending additional random values.

Abstract names do not include the leading NUL byte used in the low-level socket address.

Abstract sockets do not have any representation in the file system, and are automatically freed by @@ -320,8 +321,6 @@ except for abstract sockets, which use nng_sockaddr where supported by the underlying platform.

- - diff --git a/ref/tran/udp.html b/ref/tran/udp.html index fc474ed1..69d29ef1 100644 --- a/ref/tran/udp.html +++ b/ref/tran/udp.html @@ -309,11 +309,9 @@ the actual structure is either of type

The following transport options are supported by this transport, where supported by the underlying platform.

OptionTypeDescription
NNG_OPT_IPC_PERMISSIONSintSettable on listeners before they start, this is the UNIX file mode used when creating the socket.
NNG_OPT_LOCADDRnng_sockaddrLocal socket address, either nng_sockaddr_ipc or nng_sockaddr_abstract.
NNG_OPT_REMADDRnng_sockaddrRemote socket address, either nng_sockaddr_ipc or nng_sockaddr_abstract.
NNG_OPT_PEER_GIDintRead only option, returns the group ID of the process at the other end of the socket, if platform supports it.
NNG_OPT_PEER_PIDintRead only option, returns the processed ID of the process at the other end of the socket, if platform supports it.
NNG_OPT_PEER_UIDintRead only option, returns the user ID of the process at the other end of the socket, if platform supports it.
- - - +
OptionTypeDescription
NNG_OPT_LOCADDRnng_sockaddrThe locally bound address, will be either nng_sockaddr_in or nng_sockaddr_in6.
NNG_OPT_REMADDRnng_sockaddrThe remote peer address, will be either nng_sockaddr_in or nng_sockaddr_in6. Only valid for pipe and dialer objects.
NNG_OPT_RECVMAXSZsize_tMaximum size of incoming messages, will be limited to at most 65000.
NNG_OPT_UDP_COPY_MAXsize_tThreshold above which received messages are “loaned” up, rather than a new message being allocated and copied into.
NNG_OPT_UDP_BOUND_PORTintThe locally bound UDP port number (1-65535), read-only for listener objects only.
NNG_OPT_BOUND_PORTintThe locally bound UDP port number (1-65535), read-only for listener objects only.

Maximum Message Size

-- cgit v1.2.3-70-g09d2