From 294a01aa69296a7402b0dbafc38b88040f9c5450 Mon Sep 17 00:00:00 2001 From: gdamore Date: Sat, 18 Oct 2025 00:13:35 +0000 Subject: deploy: 31a9a4a216da05c512c50ae7cb259ca500f0c8c8 --- ref/api/ctx.html | 6 +-- ref/api/errors.html | 2 +- ref/api/pipe.html | 2 +- ref/api/sock.html | 8 ++-- ref/api/stats.html | 2 +- ref/api/stream.html | 2 +- ref/indexing.html | 10 +++-- ref/migrate/nanomsg.html | 4 +- ref/migrate/nng1.html | 4 +- ref/print.html | 105 ++++++++++++++++++++++++++++++---------------- ref/proto/rep.html | 2 +- ref/proto/req.html | 2 +- ref/proto/respondent.html | 2 +- ref/proto/sub.html | 55 ++++++++++++++++++------ ref/proto/surveyor.html | 2 +- ref/searchindex.js | 2 +- 16 files changed, 138 insertions(+), 72 deletions(-) diff --git a/ref/api/ctx.html b/ref/api/ctx.html index a3596c54..e31dffce 100644 --- a/ref/api/ctx.html +++ b/ref/api/ctx.html @@ -246,7 +246,7 @@

Contexts

Contexts in Scalability Protocols provide for isolation of protocol-specific state machines and associated data, allowing multiple concurrent state machines (or transactions) -to coexist on a single socket.

+to coexist on a single socket.

For example, a REP server may wish to allow many requests to be serviced concurrently, even though some jobs may take significant time to process. Contexts provide for this ability.

Not all protocols have contexts, because many protocols simply have no state to manage. @@ -285,7 +285,7 @@ to ensure that it cannot be confused with a valid open context.

Creating a Context

int nng_ctx_open(nng_ctx *ctxp, nng_socket s);
 
-

The nng_ctx_open function creates a separate context to be used with the socket s, +

The nng_ctx_open function creates a separate context to be used with the socket s, and returns it at the location pointed by ctxp.

Context Identity

int nng_ctx_id(nng_ctx c);
@@ -452,7 +452,7 @@ echo(void *arg)
 

Example 2: Starting the Echo Service

Given the above fragment, the following example shows setting up the service. -It assumes that the socket has already been +It assumes that the socket has already been created and any transports set up as well with functions such as nng_dial or nng_listen.


 #define CONCURRENCY 1024
diff --git a/ref/api/errors.html b/ref/api/errors.html
index 866ab01e..798e3ee9 100644
--- a/ref/api/errors.html
+++ b/ref/api/errors.html
@@ -289,7 +289,7 @@ as in diagnostic messages or log entries.

NNG_EBUSY4Resource busy. NNG_ETIMEDOUT5Timed out. The operation took longer than the allotted time. NNG_ECONNREFUSED6Connection refused. Usually indicates the wrong address or a server is running. -NNG_ECLOSED7Object closed. Typically the socket is closed. +NNG_ECLOSED7Object closed. Typically the socket is closed. NNG_EAGAIN8Try again. Typcally for a non-blocking operation that might succeed later. NNG_ENOTSUP9Not supported. Perhaps the protocol or transport is not supported, or the operation is not not supported with the transport or protocol. NNG_EADDRINUSE10Address in use. The network address is already used by another process. Most often this is seen for listeners. diff --git a/ref/api/pipe.html b/ref/api/pipe.html index b70e4a11..f0cd5b23 100644 --- a/ref/api/pipe.html +++ b/ref/api/pipe.html @@ -313,7 +313,7 @@ nng_socket nng_pipe_socket(nng_pipe p);

-These functions return the socket, dialer, or listener that created or owns the pipe.

+These functions return the socket, dialer, or listener that created or owns the pipe.

If the pipe was does not have an associated dialer or listener, then the associated will return [NNG_DIALER_INITIALIZER] or [NNG_LISTENER_INITIALIZER], as appropriate, and either [nng_dialer_id] or [nng_listener_id] for the returned object will return -1.

diff --git a/ref/api/sock.html b/ref/api/sock.html index e0b4bef9..16a0d422 100644 --- a/ref/api/sock.html +++ b/ref/api/sock.html @@ -335,7 +335,7 @@ the protocol specific processing must be performed by the application.

Most applications do not need to use raw sockets. The notable exception is when using nng_device, which requires raw sockets. -To obtain asynchronous behavior, consider using contexts instead.

+To obtain asynchronous behavior, consider using contexts instead.

The following functions open a socket in raw mode:

Sometimes it is easiest to search for a specific statistic, matching by name, -or possibly to find the tree of statistics associated with a specific socket, +or possibly to find the tree of statistics associated with a specific socket, dialer, or listener.

The nng_stat_find functions are provided for this purpose.

The nng_stat_find function returns the first statistic within the subtree of diff --git a/ref/api/stream.html b/ref/api/stream.html index e0ddb068..4b4362da 100644 --- a/ref/api/stream.html +++ b/ref/api/stream.html @@ -267,7 +267,7 @@ using these Streams APIs.

note

The nng_stream object is used for raw byte stream connections, and -should not be confused with a pipe object created on a socket using +should not be confused with a pipe object created on a socket using the nng_listen, nng_dial or related functions.

Sending and Receiving Data

diff --git a/ref/indexing.html b/ref/indexing.html index e1155479..261863b8 100644 --- a/ref/indexing.html +++ b/ref/indexing.html @@ -383,7 +383,7 @@ named pipes, 1
NNG_OPT_REQ_RESENDTICK, 1
NNG_OPT_REQ_RESENDTIME, 1
NNG_OPT_SOCKET_FD, 1
-NNG_OPT_SUB_PREFNEW, 1
+NNG_OPT_SUB_PREF_NEW, 1
NNG_OPT_SURVEYOR_SURVEYTIME, 1
nng_pair0_open, 1
nng_pair0_open_raw, 1
@@ -523,8 +523,12 @@ named pipes, 1
nng_stream_stop, 1
nng_strerror, 1
nng_strfree, 1
-nng_sub0_open, 1
-nng_sub0_open_raw, 1
+nng_sub0_ctx_subscribe, 1
+nng_sub0_ctx_unsubscribe, 1
+nng_sub0_open, 1, 2
+nng_sub0_open_raw, 1, 2
+nng_sub0_socket_subscribe, 1
+nng_sub0_socket_unsubscribe, 1
nng_surveyor0_open, 1
nng_surveyor0_open_raw, 1
nng_system_logger, 1
diff --git a/ref/migrate/nanomsg.html b/ref/migrate/nanomsg.html index eabe1549..62cf684d 100644 --- a/ref/migrate/nanomsg.html +++ b/ref/migrate/nanomsg.html @@ -317,8 +317,8 @@ NNG approach to messages. Likewise there is no struct nn_cmsghdr eq NN_IPV4ONLYNoneUse URL such as tcp4:// to obtain this functionality. NN_SOCKET_NAMENoneRemoved from NNG. NN_MAXTTLNNG_OPT_MAXTTL -NN_SUB_SUBSCRIBEnng_sub0_socket_subscribeNo longer an option, use a function call. -NN_SUB_UNSUBSCRIBEnng_sub0_socket_unsubscribeNo longer an option, use a function call. +NN_SUB_SUBSCRIBEnng_sub0_socket_subscribeNo longer an option, use a function call. +NN_SUB_UNSUBSCRIBEnng_sub0_socket_unsubscribeNo longer an option, use a function call.

Error Codes

diff --git a/ref/migrate/nng1.html b/ref/migrate/nng1.html index 54fece2f..58dd6b29 100644 --- a/ref/migrate/nng1.html +++ b/ref/migrate/nng1.html @@ -489,8 +489,8 @@ matching the actual wire protocol values, instead of int.

Applications should keep track of this information separately.

Subscriptions

The NNG_OPT_SUB_SUBSCRIBE and NNG_OPT_SUB_UNSUBSCRIBE options have been replaced by -the following functions: nng_sub0_socket_subscribe, nng_sub0_socket_unsubscribe, -nng_sub0_ctx_subscribe and nng_sub0_ctx_unsubscribe. These functions, like the options +the following functions: nng_sub0_socket_subscribe, nng_sub0_socket_unsubscribe, +nng_sub0_ctx_subscribe and nng_sub0_ctx_unsubscribe. These functions, like the options they replace, are only applicable to SUB sockets.

Statistics Use Constified Pointers

A number of the statistics functions take, or return, const nng_stat * instead diff --git a/ref/print.html b/ref/print.html index 77ce4612..bc259730 100644 --- a/ref/print.html +++ b/ref/print.html @@ -1260,7 +1260,7 @@ the protocol specific processing must be performed by the application.

Most applications do not need to use raw sockets. The notable exception is when using nng_device, which requires raw sockets. -To obtain asynchronous behavior, consider using contexts instead.

+To obtain asynchronous behavior, consider using contexts instead.

The following functions open a socket in raw mode: