From 3bf8f87d860e0c54b6297cc5a8b5d5e790e53353 Mon Sep 17 00:00:00 2001 From: gdamore Date: Tue, 31 Dec 2024 19:08:38 +0000 Subject: deploy: 04823b52c0b0cc251f2b927883a41100f7bb4a64 --- ref/api/aio.html | 24 +++- ref/api/errors.html | 4 +- ref/api/misc.html | 4 +- ref/api/stream.html | 349 ++++++++++++++++++++++++++++++++++++++++++++++++++ ref/api/synch.html | 8 +- ref/indexing.html | 13 +- ref/migrate/nng1.html | 2 +- ref/print.html | 188 +++++++++++++++++++++++++-- ref/searchindex.js | 2 +- ref/searchindex.json | 2 +- ref/toc.html | 2 +- ref/toc.js | 2 +- 12 files changed, 576 insertions(+), 24 deletions(-) create mode 100644 ref/api/stream.html diff --git a/ref/api/aio.html b/ref/api/aio.html index d514d152..482a6024 100644 --- a/ref/api/aio.html +++ b/ref/api/aio.html @@ -310,7 +310,7 @@ and returns immediately without waiting. If cancellation was successful, then nng_aio_result will return err.

The nng_aio_cancel function acts like nng_aio_abort, but uses the error code NNG_ECANCELED.

-

The nng_aio_stop function aborts the aio operation with [NNG_ESTOPPED], +

The nng_aio_stop function aborts the aio operation with NNG_ESTOPPED, and then waits the operation and any associated callback to complete. This function also marks aio itself permanently stopped, so that any new operations scheduled by I/O providers using nng_aio_start @@ -473,9 +473,31 @@ return NULL.

It is an error to call this function while the aio is currently in use by an active asynchronous operation.

+

Scatter Gather Vectors

+
typedef struct nng_iov {
+	void  *iov_buf;
+	size_t iov_len;
+} nng_iov;
+
+void nng_aio_set_iov(nng_aio *aio, unsigned nio, const nng_iov *iov);
+
+

+Some asynchronous operations, such as those dealing with streams, use scatter or gather +vectors, where data to be transferred is either gathered from multiple separate regions of memory, or +scattered into separate regions of memory. For example a message may have a header located at one location +in memory, and a payload located in another.

+

The nng_aio_set_iov function configures the aio to use nio separate segments, described by +the elements in iov. For each of these, the segment of size iov_len located at iov_buf will be used.

+

The elements of iov will be copied into aio, so the vector may be located +on the stack or another temporary location. The locations referenced by it, must remain valid for +the duration of the operation, of course.

+

Note that many of these operations are not guaranteed to perform a full transfer of data, so even a +successful operation should check the amount of data actually transferred using nng_aio_count, +and if necessary resubmit the operation with a suitably updated vector of nng_iov using this function.

See Also

Synchronization, Threads, +Streams, Time

diff --git a/ref/api/errors.html b/ref/api/errors.html index 980d639b..d72d0c33 100644 --- a/ref/api/errors.html +++ b/ref/api/errors.html @@ -304,7 +304,7 @@ which behave the same way, but NNG does not use a separate - @@ -318,7 +318,7 @@ which behave the same way, but NNG does not use a separate - diff --git a/ref/api/misc.html b/ref/api/misc.html index 0cbe458a..e1a25ca4 100644 --- a/ref/api/misc.html +++ b/ref/api/misc.html @@ -279,7 +279,7 @@ manner depending upon the link options and how the library is built.)