From 6096172cf3630dbc5366a85fe89fb361b4f40fae Mon Sep 17 00:00:00 2001 From: gdamore Date: Sun, 27 Oct 2024 19:43:14 +0000 Subject: deploy: c699588c5e68880b8fd890711a4f7cca2b49a0bc --- ref/api/aio.html | 20 ++++++++++---------- ref/api/errors.html | 4 ++-- ref/api/msg.html | 4 ++-- ref/api/thread.html | 2 +- ref/api/time.html | 6 +++--- 5 files changed, 18 insertions(+), 18 deletions(-) (limited to 'ref/api') diff --git a/ref/api/aio.html b/ref/api/aio.html index fa90d946..e506a242 100644 --- a/ref/api/aio.html +++ b/ref/api/aio.html @@ -272,13 +272,13 @@ when the operation is complete (whether successfully or not). This callback will be executed exactly once.

The asynchronous I/O framework also supports cancellation of operations that are already in progress as well setting a maximum -timeout for them to complete.

-

It is also possible to initiate an asynchronous operation, and wait for it to +timeout for them to complete.

+

It is also possible to initiate an asynchronous operation, and wait for it to complete, creating a synchronous flow from an asynchronous one.

Create Handle

int nng_aio_alloc(nng_aio **aiop, void (*callb)(void *), void *arg);
 
-

The nng_aio_alloc function creates an nng_aio object, with the +

The nng_aio_alloc function creates an nng_aio object, with the callback callb taking the argument arg, and returns it in aiop.

If this succeeds, the function returns zero. Otherwise it may return NNG_ENOMEM.

@@ -288,7 +288,7 @@ complete, creating a synchronous flow from an asynchronous one.

The arg should normally be a structure that contains a pointer to the aiop, or from which it can be located. This allows callb to check the handle for -success using nng_aio_result, as well access other properties of aiop.

+success using nng_aio_result, as well access other properties of aiop.

@@ -328,7 +328,7 @@ If the operation is successfully canceled or aborted, then the callback will still be called.

The nng_aio_abort function aborts the operation associated with aio and returns immediately without waiting. If cancellation was successful, -then nng_aio_result will return err.

+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_ECANCELED, @@ -376,7 +376,7 @@ function will not be called until the callback has completed.

important

The nng_aio_wait function should never be called from a function that itself -is a callback of an nng_aio, either this one or any other. +is a callback of an nng_aio, either this one or any other. Doing so may result in a deadlock.

Test for Completion

@@ -384,7 +384,7 @@ Doing so may result in a deadlock.

The nng_aio_busy function returns true if the aio is currently busy performing an operation or is executing a completion callback. Otherwise it return false. -This is the same test used internally by nng_aio_wait.

+This is the same test used internally by nng_aio_wait.

@@ -411,7 +411,7 @@ Operations that do not transfer data, or do not keep a count, may return zero fo

The return value from these functions is undefined if the operation has not completed yet. Either call these from the handle’s completion callback, or after waiting for the -operation to complete with nng_aio_wait.

+operation to complete with nng_aio_wait.

Messages

nng_msg *nng_aio_get_msg(nng_aio *aio);
@@ -460,14 +460,14 @@ The values pointed to by the iov_buf members are not copie
 

Most functions using nng_iov do not guarantee to transfer all of the data that they are requested to. To be sure that correct amount of data is transferred, as well as to start an attempt to complete any partial transfer, check the amount of data transferred by -calling nng_aio_count.

+calling nng_aio_count.

Inputs and Outputs

void nng_aio_set_input(nng_aio *aio, unsigned int index, void *param);
 void *nng_aio_get_output(nng_aio *aio, unsigned int index);
 

Asynchronous operations can take additional input parameters, and -provide additional result outputs besides the result code.

+provide additional result outputs besides the result code.

The nng_aio_set_input function sets the input parameter at index to param for the operation associated with aio.

The nng_aio_get_output function returns the output result at index diff --git a/ref/api/errors.html b/ref/api/errors.html index b928bbf5..337fac4b 100644 --- a/ref/api/errors.html +++ b/ref/api/errors.html @@ -298,8 +298,8 @@ as in diagnostic messages or log entries.

NNG_EWRITEONLY25Write only resource. A read operation failed because the object only supports writes. NNG_ECRYPTO26Cryptographic error. Usually indicates an invalid key was used for TLS. NNG_EPEERAUTH27Peer could not be authenticated. -NNG_ENOARG28Option requires argument. A command-line option was supplied without an argument. Only used with nng_opts_parse. -NNG_EAMBIGUOUS29Ambiguous option. The command line option could not be unambiguously resolved. Only used with nng_opts_parse. +NNG_ENOARG28Option requires argument. A command-line option was supplied without an argument. Only used with nng_opts_parse. +NNG_EAMBIGUOUS29Ambiguous option. The command line option could not be unambiguously resolved. Only used with nng_opts_parse. NNG_EBADTYPE30Incorrect type. A type-specific function was used for an object of the wrong type. NNG_ECONNSHUT31Connection shutdown. The connection was shut down and cannot be used. NNG_EINTERNAL1000An unidentifier internal error occurred. diff --git a/ref/api/msg.html b/ref/api/msg.html index ff9a1cad..664795c4 100644 --- a/ref/api/msg.html +++ b/ref/api/msg.html @@ -244,8 +244,8 @@

Messages

Messages in Scalability Protocols are the fundamental unit of transmission and reception, as these protocols are fundamentally message-oriented.

-

Messages have a [body][nng_msg_body], containing the application-supplied -payload, and a [header][nng_msg_header], containing protocol specific routing and similar +

Messages have a body, containing the application-supplied +payload, and a header, containing protocol specific routing and similar related information.

diff --git a/ref/api/thread.html b/ref/api/thread.html index 0f9e0ac7..e9724325 100644 --- a/ref/api/thread.html +++ b/ref/api/thread.html @@ -277,7 +277,7 @@ Blocking NNG library calls can however be made safely from NNG

The system may impose limits on the number of threads that can be created. Typically applications should not create more than a dozen of these. If greater concurrency or scalability is needed, consider instead using -an asynchronous model using nng_aio structures.

+an asynchronous model using nng_aio structures.

Thread Structure

typedef struct nng_thread nng_thread;
diff --git a/ref/api/time.html b/ref/api/time.html
index f3bf9685..43a52fb6 100644
--- a/ref/api/time.html
+++ b/ref/api/time.html
@@ -304,18 +304,18 @@ underlying system.

Wait Asynchronously

void nng_sleep_aio(nng_duration msec, nng_aio *aio);
 
-

It is possible to wait as the action on an nng_aio, which in effect +

It is possible to wait as the action on an nng_aio, which in effect acts like scheduling a callback to run after a specified period of time.

The nng_sleep_aio function provides this capability. After msec milliseconds have passed, then aio’s callback will be executed. If this sleep waits without interruption, and then completes, the result from -nng_aio_result will be zero.

+nng_aio_result will be zero.

note

-

If a timeout shorter than msec is set on aio using nng_aio_set_timeout, +

If a timeout shorter than msec is set on aio using nng_aio_set_timeout, then the sleep will wake up early, with a result code of NNG_ETIMEDOUT.

See Also

-- cgit v1.2.3-70-g09d2