From 2840f9542e57a4110e86844abe54b8041b496191 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 5 Feb 2018 11:18:53 -0800 Subject: man page updates for 0.2.0 --- man/v0.2.0/libnng.html | 28 +- man/v0.2.0/nng_aio_abort.html | 606 ++++++++++++++++++++++++++++++++++ man/v0.2.0/nng_aio_alloc.html | 632 +++++++++++++++++++++++++++++++++++ man/v0.2.0/nng_aio_cancel.html | 619 +++++++++++++++++++++++++++++++++++ man/v0.2.0/nng_aio_count.html | 622 +++++++++++++++++++++++++++++++++++ man/v0.2.0/nng_aio_free.html | 597 +++++++++++++++++++++++++++++++++ man/v0.2.0/nng_aio_get_input.html | 603 ++++++++++++++++++++++++++++++++++ man/v0.2.0/nng_aio_get_output.html | 627 +++++++++++++++++++++++++++++++++++ man/v0.2.0/nng_aio_result.html | 626 +++++++++++++++++++++++++++++++++++ man/v0.2.0/nng_aio_set_input.html | 637 ++++++++++++++++++++++++++++++++++++ man/v0.2.0/nng_aio_set_iov.html | 635 +++++++++++++++++++++++++++++++++++ man/v0.2.0/nng_aio_set_timeout.html | 623 +++++++++++++++++++++++++++++++++++ man/v0.2.0/nng_aio_stop.html | 617 ++++++++++++++++++++++++++++++++++ man/v0.2.0/nng_aio_wait.html | 599 +++++++++++++++++++++++++++++++++ 14 files changed, 8057 insertions(+), 14 deletions(-) create mode 100644 man/v0.2.0/nng_aio_abort.html create mode 100644 man/v0.2.0/nng_aio_alloc.html create mode 100644 man/v0.2.0/nng_aio_cancel.html create mode 100644 man/v0.2.0/nng_aio_count.html create mode 100644 man/v0.2.0/nng_aio_free.html create mode 100644 man/v0.2.0/nng_aio_get_input.html create mode 100644 man/v0.2.0/nng_aio_get_output.html create mode 100644 man/v0.2.0/nng_aio_result.html create mode 100644 man/v0.2.0/nng_aio_set_input.html create mode 100644 man/v0.2.0/nng_aio_set_iov.html create mode 100644 man/v0.2.0/nng_aio_set_timeout.html create mode 100644 man/v0.2.0/nng_aio_stop.html create mode 100644 man/v0.2.0/nng_aio_wait.html diff --git a/man/v0.2.0/libnng.html b/man/v0.2.0/libnng.html index 10173c03..984d7762 100644 --- a/man/v0.2.0/libnng.html +++ b/man/v0.2.0/libnng.html @@ -804,19 +804,23 @@ be associated with an aio at any time.

nng_aio_alloc(3)

-

allocate asynchronous I/O context

+

allocate asynchronous I/O handle

nng_aio_cancel(3)

cancel asynchronous I/O operation

+

nng_aio_count(3)

+

return number of bytes transferred

+ +

nng_aio_free(3)

-

free asynchronous I/O context

+

free asynchronous I/O handle

nng_aio_get_input(3)

-

get input parameter

+

return input parameter

nng_aio_get_msg(3)

@@ -824,11 +828,11 @@ be associated with an aio at any time.

nng_aio_get_output(3)

-

get output result

+

return output result

nng_aio_result(3)

-

return result from asynchronous operation

+

return result of asynchronous operation

nng_aio_set_input(3)

@@ -843,12 +847,8 @@ be associated with an aio at any time.

set message for an asynchronous send

-

nng_aio_set_input(3)

-

set output result

- -

nng_aio_set_timeout(3)

-

set timeout for an asynchronous send

+

set asynchronous I/O timeout

nng_aio_stop(3)

@@ -856,15 +856,15 @@ be associated with an aio at any time.

nng_aio_wait(3)

-

wait for an asynchronous I/O operation

+

wait for asynchronous I/O operation

nng_recv_aio(3)

-

receive a message asynchronously

+

receive message asynchronously

nng_send_aio(3)

-

send a message asynchronously

+

send message asynchronously

@@ -1247,7 +1247,7 @@ This document is supplied under the terms of the diff --git a/man/v0.2.0/nng_aio_abort.html b/man/v0.2.0/nng_aio_abort.html new file mode 100644 index 00000000..9168f3b6 --- /dev/null +++ b/man/v0.2.0/nng_aio_abort.html @@ -0,0 +1,606 @@ +--- +version: 0.2.0 +layout: default +--- + + + + + + + + +nng_aio_abort(3) + + + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+void nng_aio_abort(nng_aio *aio, int err);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_aio_abort() function aborts an operation previously started +with the handle aio. If the operation is aborted, then the callback +for the handle will be called, and the function +nng_aio_result(3) will return the error err.

+
+
+

This function does not wait for the operation to be fully aborted, but +returns immediately.

+
+
+

If no operation is currently in progress (either because it has already +finished, or no operation has been started yet), then this function +has no effect.

+
+
+
+
+

RETURN VALUES

+
+
+

None.

+
+
+
+
+

ERRORS

+
+
+

None.

+
+
+
+ +
+ +
+
+

Copyright 2018 Staysail Systems, Inc.
+Copyright 2018 Capitar IT Group BV
+
+This document is supplied under the terms of the MIT License.

+
+
+
+
+ + + diff --git a/man/v0.2.0/nng_aio_alloc.html b/man/v0.2.0/nng_aio_alloc.html new file mode 100644 index 00000000..b06f098f --- /dev/null +++ b/man/v0.2.0/nng_aio_alloc.html @@ -0,0 +1,632 @@ +--- +version: 0.2.0 +layout: default +--- + + + + + + + + +nng_aio_alloc(3) + + + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+int nng_aio_alloc(nng_aio **aiop, void (*callb)(void *), void *arg);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_aio_alloc() function allocates a handle for asynchronous I/O +operations, and stores a pointer to it in aiop. The handle is initialized +with a completion callback of callb, which will be executed when an +associated asynchronous operation finishes. It will be called with the +argument arg.

+
+
+

Asynchronous I/O operations all take an "aio" handle such as allocated by +this function. Such operations are usually started by a function that returns +immediately. The operation is then run asynchronously, and completes sometime +later. When that operation is complete, the callback supplied here is called, +and that callback is able to determine the result of the operation using +nng_aio_result(3), nng_aio_count(3), +and nng_aio_get_output(3).

+
+
+

It is possible to wait synchronously for an otherwise asynchronous operation +by using the function nng_aio_wait(3). In that case, +it is permissible for callb and arg to both be NULL. Note that if +these are NULL, then it will not be possible to determine when the +operation is complete except by calling the aforementioned +nng_aio_wait(3).

+
+
+
+
+

RETURN VALUES

+
+
+

This function returns 0 on success, and non-zero otherwise.

+
+
+
+
+

ERRORS

+
+
+
+
NNG_ENOMEM
+
+

Insufficient free memory to perform the operation.

+
+
+
+
+
+ +
+ +
+
+

Copyright 2018 Staysail Systems, Inc.
+Copyright 2018 Capitar IT Group BV
+
+This document is supplied under the terms of the MIT License.

+
+
+
+
+ + + diff --git a/man/v0.2.0/nng_aio_cancel.html b/man/v0.2.0/nng_aio_cancel.html new file mode 100644 index 00000000..2c6a5568 --- /dev/null +++ b/man/v0.2.0/nng_aio_cancel.html @@ -0,0 +1,619 @@ +--- +version: 0.2.0 +layout: default +--- + + + + + + + + +nng_aio_cancel(3) + + + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+void nng_aio_cancel(nng_aio *aio);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_aio_cancel() function aborts an operation previously started +with the handle aio. If the operation is aborted, then the callback +for the handle will be called, and the function +nng_aio_result(3) will return the error NNG_ECANCELED.

+
+
+

This function does not wait for the operation to be fully aborted, but +returns immediately.

+
+
+

If no operation is currently in progress (either because it has already +finished, or no operation has been started yet), then this function +has no effect.

+
+
+ + + + + +
+ + +This function is the same as calling nng_aio_abort() +with the error NNG_ECANCELED. +
+
+
+
+
+

RETURN VALUES

+
+
+

None.

+
+
+
+
+

ERRORS

+
+
+

None.

+
+
+
+ +
+ +
+
+

Copyright 2018 Staysail Systems, Inc.
+Copyright 2018 Capitar IT Group BV
+
+This document is supplied under the terms of the MIT License.

+
+
+
+
+ + + diff --git a/man/v0.2.0/nng_aio_count.html b/man/v0.2.0/nng_aio_count.html new file mode 100644 index 00000000..f1bb9769 --- /dev/null +++ b/man/v0.2.0/nng_aio_count.html @@ -0,0 +1,622 @@ +--- +version: 0.2.0 +layout: default +--- + + + + + + + + +nng_aio_count(3) + + + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+size_t nng_aio_count(nng_aio *aio);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_aio_count() returns the number of bytes transferred by the +asynchronous operation associated with the handle aio.

+
+
+

Some asynchronous operations do not provide meaningful data for this +function; for example operations that establish connections do not +transfer user data (they may transfer protocol data though) — in this case +this function will generally return zero.

+
+
+

This function is most useful when used with operations that make use of +of a scatter/gather vector (set by nng_aio_set_iov(3)).

+
+
+ + + + + +
+ + +The return value from this function is undefined if the operation +has not completed yet. Either call this from the handle’s completion +callback, or after waiting for the operation to complete with +nng_aio_wait(3). +
+
+
+
+
+

RETURN VALUES

+
+
+

The number of bytes transferred by the operation.

+
+
+
+
+

ERRORS

+
+
+

None.

+
+
+
+ +
+ +
+
+

Copyright 2018 Staysail Systems, Inc.
+Copyright 2018 Capitar IT Group BV
+
+This document is supplied under the terms of the MIT License.

+
+
+
+
+ + + diff --git a/man/v0.2.0/nng_aio_free.html b/man/v0.2.0/nng_aio_free.html new file mode 100644 index 00000000..b2a3f2a8 --- /dev/null +++ b/man/v0.2.0/nng_aio_free.html @@ -0,0 +1,597 @@ +--- +version: 0.2.0 +layout: default +--- + + + + + + + + +nng_aio_free(3) + + + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+void nng_aio_free(nng_aio *aio);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_aio_free() function frees an allocated asynchronous I/O handle. +If any operation is in progress, the operation is canceled, and the +caller is blocked until the operation is completely canceled, to ensure +that it is safe to deallocate the handle and any associated resources. +(This is done by implicitly calling nng_aio_stop(3).)

+
+
+
+
+

RETURN VALUES

+
+
+

None.

+
+
+
+
+

ERRORS

+
+
+

None.

+
+
+
+
+

SEE ALSO

+ +
+
+ +
+
+

Copyright 2018 Staysail Systems, Inc.
+Copyright 2018 Capitar IT Group BV
+
+This document is supplied under the terms of the MIT License.

+
+
+
+
+ + + diff --git a/man/v0.2.0/nng_aio_get_input.html b/man/v0.2.0/nng_aio_get_input.html new file mode 100644 index 00000000..f579694c --- /dev/null +++ b/man/v0.2.0/nng_aio_get_input.html @@ -0,0 +1,603 @@ +--- +version: 0.2.0 +layout: default +--- + + + + + + + + +nng_aio_get_input(3) + + + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+void *nng_aio_get_input(nng_aio *aio, unsigned int index);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_aio_get_input() function returns the value of the input parameter +previously set at index on aio with the +nng_aio_set_input(3) function.

+
+
+

The valid values of index range from zero (0) to three (3), as no operation +currently defined can accept more than four parameters. (This limit could +increase in the future.) If the index supplied is outside of this range, +or of the input parameter was not previously set, then NULL is returned.

+
+
+
+
+

RETURN VALUES

+
+
+

Value previously set, or NULL.

+
+
+
+
+

ERRORS

+
+
+

None.

+
+
+
+ +
+ +
+
+

Copyright 2018 Staysail Systems, Inc.
+Copyright 2018 Capitar IT Group BV
+
+This document is supplied under the terms of the MIT License.

+
+
+
+
+ + + diff --git a/man/v0.2.0/nng_aio_get_output.html b/man/v0.2.0/nng_aio_get_output.html new file mode 100644 index 00000000..3717c207 --- /dev/null +++ b/man/v0.2.0/nng_aio_get_output.html @@ -0,0 +1,627 @@ +--- +version: 0.2.0 +layout: default +--- + + + + + + + + +nng_aio_get_output(3) + + + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+void *nng_aio_get_output(nng_aio *aio, unsigned int index);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_aio_get_output() function returns the output result at index +resulting from the asynchronous operation associated with aio.

+
+
+

The type and semantics of output parameters are determined by specific +operations.

+
+
+ + + + + +
+ + +If the index does not correspond to a defined output for the operation, +or the operation did not succeed, then the return value will be NULL. +
+
+
+ + + + + +
+ + +It is an error to call this function while the aio is currently +in use by an active asynchronous operation, or if no operation has been +performed using the aio yet. +
+
+
+
+
+

RETURN VALUES

+
+
+

The indexth result of the operation, or NULL.

+
+
+
+
+

ERRORS

+
+
+

None.

+
+
+
+ +
+ +
+
+

Copyright 2018 Staysail Systems, Inc.
+Copyright 2018 Capitar IT Group BV
+
+This document is supplied under the terms of the MIT License.

+
+
+
+
+ + + diff --git a/man/v0.2.0/nng_aio_result.html b/man/v0.2.0/nng_aio_result.html new file mode 100644 index 00000000..703ec599 --- /dev/null +++ b/man/v0.2.0/nng_aio_result.html @@ -0,0 +1,626 @@ +--- +version: 0.2.0 +layout: default +--- + + + + + + + + +nng_aio_result(3) + + + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+int nng_aio_wait(nng_aio *aio);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_aio_result() returns the result of the operation associated +with the handle aio. +If the operation was successful, then 0 is returned. Otherwise a non-zero +error code is returned.

+
+
+ + + + + +
+ + +The return value from this function is undefined if the operation +has not completed yet. Either call this from the handle’s completion +callback, or after waiting for the operation to complete with +nng_aio_wait(3). +
+
+
+
+
+

RETURN VALUES

+
+
+

The result of the operation, either zero on success, or an error +number on failure.

+
+
+
+
+

ERRORS

+
+
+
+
NNG_ETIMEDOUT
+
+

The operation timed out.

+
+
NNG_ECANCELED
+
+

The operation was canceled.

+
+
+
+
+

Various other return values are possible dependending on the operation.

+
+
+
+ +
+ +
+
+

Copyright 2018 Staysail Systems, Inc.
+Copyright 2018 Capitar IT Group BV
+
+This document is supplied under the terms of the MIT License.

+
+
+
+
+ + + diff --git a/man/v0.2.0/nng_aio_set_input.html b/man/v0.2.0/nng_aio_set_input.html new file mode 100644 index 00000000..87770ee8 --- /dev/null +++ b/man/v0.2.0/nng_aio_set_input.html @@ -0,0 +1,637 @@ +--- +version: 0.2.0 +layout: default +--- + + + + + + + + +nng_aio_set_input(3) + + + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+void nng_aio_set_input(nng_aio *aio, unsigned int index, void *param);
+
+
+
+
+
+

DESCRIPTION

+
+
+

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

+
+
+

The type and semantics of input parameters are determined by specific +operations; the caller must supply appropriate inputs for the operation +to be performed.

+
+
+

The valid values of index range from zero (0) to three (3), as no operation +currently defined can accept more than four parameters. (This limit could +increase in the future.)

+
+
+ + + + + +
+ + +If the index does not correspond to a defined input for the operation, +then this function will have no effect. Note that attempts to set +parameters with an index greater than three (3) will simply be ignored. +
+
+
+ + + + + +
+ + +It is an error to call this function while the aio is currently +in use by an active asynchronous operation. +
+
+
+

An input parameter set with this function may be retrieved later with +the nng_aio_get_input(3) function.

+
+
+
+
+

RETURN VALUES

+
+
+

None.

+
+
+
+
+

ERRORS

+
+
+

None.

+
+
+
+ +
+ +
+
+

Copyright 2018 Staysail Systems, Inc.
+Copyright 2018 Capitar IT Group BV
+
+This document is supplied under the terms of the MIT License.

+
+
+
+
+ + + diff --git a/man/v0.2.0/nng_aio_set_iov.html b/man/v0.2.0/nng_aio_set_iov.html new file mode 100644 index 00000000..f1545c87 --- /dev/null +++ b/man/v0.2.0/nng_aio_set_iov.html @@ -0,0 +1,635 @@ +--- +version: 0.2.0 +layout: default +--- + + + + + + + + +nng_aio_set_iov(3) + + + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+int nng_aio_set_iov(nng_aio *aio, unsigned int niov, nng_iov *iov);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_aio_set_iov() function sets a scatter/gather vector iov on the +handle aio.

+
+
+

The iov is a pointer to an array of niov nng_iov structures, which have +the following definition:

+
+
+
+
    typedef struct nng_iov {
+        void * iov_buf;
+        size_t iov_len;
+    };
+
+
+
+

The iov is copied into storage in the aio itself, so that callers +may use stack allocated nng_iov structures. The values pointed to +by the iov_buf members are not copied by this function though.

+
+
+

Up to four nng_iov members may be supplied without causing any +allocations, and thus this operation is guaranteed to succeed for +values of niov less than four.

+
+
+

More than four (4) nng_iov members may be supplied, but this may require +heap allocations, and so the operation may fail with NNG_ENOMEM. +Additionally, not every operation can support longer vectors; the +actual limit is determined by the system, but is generally at least +sixteen (16). Furthermore, values for niov larger than sixty-four (64) will +generally result in NNG_EINVAL.

+
+
+
+
+

RETURN VALUES

+
+
+

This function returns 0 on success, and non-zero otherwise.

+
+
+
+
+

ERRORS

+
+
+
+
NNG_ENOMEM
+
+

Insufficient free memory to perform operation.

+
+
NNG_EINVAL
+
+

Value of specified niov is too large.

+
+
+
+
+
+ +
+ +
+
+

Copyright 2018 Staysail Systems, Inc.
+Copyright 2018 Capitar IT Group BV
+
+This document is supplied under the terms of the MIT License.

+
+
+
+
+ + + diff --git a/man/v0.2.0/nng_aio_set_timeout.html b/man/v0.2.0/nng_aio_set_timeout.html new file mode 100644 index 00000000..81409ee1 --- /dev/null +++ b/man/v0.2.0/nng_aio_set_timeout.html @@ -0,0 +1,623 @@ +--- +version: 0.2.0 +layout: default +--- + + + + + + + + +nng_aio_set_timeout(3) + + + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+typedef int nng_duration;
+void nng_aio_set_timeout(nng_aio *aio, nng_duration timeout);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_aio_set_timeout() function sets a timeout for the asynchronous +operation associated with aio. This causes a timer to be started when the operation is actually +started. If the timer expires before the operation is completed, then it is +aborted with an error of NNG_ETIMEDOUT. The timeout is specified as a +relative number of milliseconds.

+
+
+

If the timeout is NNG_DURATION_INFINITE, then no timeout is used. +If the timeout is NNG_DURATION_DEFAULT, then a "default" or socket-specific +timeout is used. (This is frequently the same as NNG_DURATION_INFINITE.)

+
+
+ + + + + +
+ + +As most operations involve some context switching, it is usually a good +idea to allow at least a few tens of milliseconds before timing them out — a too small timeout might not allow the operation to properly begin before +giving up! +
+
+
+

The value of timeout set for the aio is persistent, so that if the +handle is reused for multiple operations, they will have the same relative +timeout.

+
+
+
+
+

RETURN VALUES

+
+
+

None.

+
+
+
+
+

ERRORS

+
+
+

None.

+
+
+
+ +
+ +
+
+

Copyright 2018 Staysail Systems, Inc.
+Copyright 2018 Capitar IT Group BV
+
+This document is supplied under the terms of the MIT License.

+
+
+
+
+ + + diff --git a/man/v0.2.0/nng_aio_stop.html b/man/v0.2.0/nng_aio_stop.html new file mode 100644 index 00000000..06cf249e --- /dev/null +++ b/man/v0.2.0/nng_aio_stop.html @@ -0,0 +1,617 @@ +--- +version: 0.2.0 +layout: default +--- + + + + + + + + +nng_aio_stop(3) + + + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+void nng_aio_stop(nng_aio *aio);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_aio_stop() function stops the asynchronous I/O operation +associated with aio by aborting with NNG_ECANCELED, and then waits +for it to complete or to be completely aborted.

+
+
+

This is logically the equivalent of nng_aio_cancel(3) +followed by nng_aio_wait(3), except that the asynchronous +I/O handle may not be used for any further operations.

+
+
+ + + + + +
+ + +When multiple asynchronous I/O handles are in use and need to be +shut down, it is safest to stop all of them, before deallocating any of +this with nng_aio_free(3), particularly if the callbacks +might attempt to reschedule additional operations. +
+
+
+
+
+

RETURN VALUES

+
+
+

None.

+
+
+
+
+

ERRORS

+
+
+

None.

+
+
+
+ +
+ +
+
+

Copyright 2018 Staysail Systems, Inc.
+Copyright 2018 Capitar IT Group BV
+
+This document is supplied under the terms of the MIT License.

+
+
+
+
+ + + diff --git a/man/v0.2.0/nng_aio_wait.html b/man/v0.2.0/nng_aio_wait.html new file mode 100644 index 00000000..9567f0f0 --- /dev/null +++ b/man/v0.2.0/nng_aio_wait.html @@ -0,0 +1,599 @@ +--- +version: 0.2.0 +layout: default +--- + + + + + + + + +nng_aio_wait(3) + + + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+void nng_aio_wait(nng_aio *aio);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_aio_wait() function waits for an asynchronous I/O operation +to complete. If the operation has not been started, or has already +completed, then it returns immediately.

+
+
+

If the a callback was set with aio when it was allocated, then this +function will not be called until the callback has completed.

+
+
+
+
+

RETURN VALUES

+
+
+

None.

+
+
+
+
+

ERRORS

+
+
+

None.

+
+
+
+
+

SEE ALSO

+ +
+
+ +
+
+

Copyright 2018 Staysail Systems, Inc.
+Copyright 2018 Capitar IT Group BV
+
+This document is supplied under the terms of the MIT License.

+
+
+
+
+ + + -- cgit v1.2.3-70-g09d2