summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-04-04 01:20:01 -0700
committerGarrett D'Amore <garrett@damore.org>2024-04-04 01:20:01 -0700
commit71af5e40f3692ef633fb8fe49b8428b30d586d99 (patch)
tree6b75b714a1ff5a6008f4fb30e3fb987cde8e27fe /docs
parent85fbe7f9e4642b554d0d97f2e3ff2aa12978691a (diff)
downloadnng-71af5e40f3692ef633fb8fe49b8428b30d586d99.tar.gz
nng-71af5e40f3692ef633fb8fe49b8428b30d586d99.tar.bz2
nng-71af5e40f3692ef633fb8fe49b8428b30d586d99.zip
Async I/O pages moved.
Diffstat (limited to 'docs')
-rw-r--r--docs/man/nng_aio_abort.3.adoc55
-rw-r--r--docs/man/nng_aio_alloc.3.adoc88
-rw-r--r--docs/man/nng_aio_busy.3.adoc56
-rw-r--r--docs/man/nng_aio_cancel.3.adoc58
-rw-r--r--docs/man/nng_aio_count.3.adoc61
-rw-r--r--docs/man/nng_aio_free.3.adoc54
-rw-r--r--docs/man/nng_aio_get_msg.3.adoc49
-rw-r--r--docs/man/nng_aio_get_output.3.adoc56
-rw-r--r--docs/man/nng_aio_result.3.adoc59
-rw-r--r--docs/man/nng_aio_set_input.3.adoc63
-rw-r--r--docs/man/nng_aio_set_iov.3.adoc67
-rw-r--r--docs/man/nng_aio_set_msg.3.adoc47
-rw-r--r--docs/man/nng_aio_set_timeout.3.adoc74
-rw-r--r--docs/man/nng_aio_stop.3.adoc60
-rw-r--r--docs/man/nng_aio_wait.3.adoc54
-rw-r--r--docs/ref/aio/nng_aio_abort.adoc26
-rw-r--r--docs/ref/aio/nng_aio_alloc.adoc58
-rw-r--r--docs/ref/aio/nng_aio_busy.adoc33
-rw-r--r--docs/ref/aio/nng_aio_cancel.adoc29
-rw-r--r--docs/ref/aio/nng_aio_count.adoc35
-rw-r--r--docs/ref/aio/nng_aio_free.adoc28
-rw-r--r--docs/ref/aio/nng_aio_get_msg.adoc23
-rw-r--r--docs/ref/aio/nng_aio_get_output.adoc28
-rw-r--r--docs/ref/aio/nng_aio_result.adoc37
-rw-r--r--docs/ref/aio/nng_aio_set_input.adoc36
-rw-r--r--docs/ref/aio/nng_aio_set_iov.adoc49
-rw-r--r--docs/ref/aio/nng_aio_set_msg.adoc23
-rw-r--r--docs/ref/aio/nng_aio_set_timeout.adoc42
-rw-r--r--docs/ref/aio/nng_aio_stop.adoc30
-rw-r--r--docs/ref/aio/nng_aio_wait.adoc28
30 files changed, 505 insertions, 901 deletions
diff --git a/docs/man/nng_aio_abort.3.adoc b/docs/man/nng_aio_abort.3.adoc
deleted file mode 100644
index 8d4e904b..00000000
--- a/docs/man/nng_aio_abort.3.adoc
+++ /dev/null
@@ -1,55 +0,0 @@
-= nng_aio_abort(3)
-//
-// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
-// Copyright 2018 Capitar IT Group BV <info@capitar.com>
-//
-// This document is supplied under the terms of the MIT License, a
-// copy of which should be located in the distribution where this
-// file was obtained (LICENSE.txt). A copy of the license may also be
-// found online at https://opensource.org/licenses/MIT.
-//
-
-== NAME
-
-nng_aio_abort - abort asynchronous I/O operation
-
-== SYNOPSIS
-
-[source, c]
-----
-#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
-xref:nng_aio_result.3.adoc[`nng_aio_result()`] 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.
-
-== SEE ALSO
-
-[.text-left]
-xref:nng_aio_alloc.3.adoc[nng_aio_alloc(3)],
-xref:nng_aio_cancel.3.adoc[nng_aio_cancel(3)],
-xref:nng_aio_result.3.adoc[nng_aio_result(3)],
-xref:nng_aio.5.adoc[nng_aio(5)],
-xref:nng.7.adoc[nng(7)]
diff --git a/docs/man/nng_aio_alloc.3.adoc b/docs/man/nng_aio_alloc.3.adoc
deleted file mode 100644
index 6a424e3b..00000000
--- a/docs/man/nng_aio_alloc.3.adoc
+++ /dev/null
@@ -1,88 +0,0 @@
-= nng_aio_alloc(3)
-//
-// Copyright 2022 Staysail Systems, Inc. <info@staysail.tech>
-// Copyright 2018 Capitar IT Group BV <info@capitar.com>
-//
-// This document is supplied under the terms of the MIT License, a
-// copy of which should be located in the distribution where this
-// file was obtained (LICENSE.txt). A copy of the license may also be
-// found online at https://opensource.org/licenses/MIT.
-//
-
-== NAME
-
-nng_aio_alloc - allocate asynchronous I/O handle
-
-== SYNOPSIS
-
-[source, c]
-----
-#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_.
-
-NOTE: The callback _callb_ must not perform any blocking operations, and
-must complete its execution quickly. If _callb_ does block, this can
-lead ultimately to an apparent "hang" or deadlock in the application.
-This also means you should avoid operations such as allocating new objects,
-which also means opening or closing sockets, dialers, and so forth.
-
-TIP: If more complex or blocking work needs to be performed by _callb_, a separate
-thread can be used, along with a xref:nng_cv_alloc.3supp.adoc[condition variable]
-which can be signaled by the callback.
-
-Asynchronous I/O operations all take an xref:nng_aio.5.adoc[`nng_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
-xref:nng_aio_result.3.adoc[`nng_aio_result()`],
-xref:nng_aio_count.3.adoc[`nng_aio_count()`],
-and xref:nng_aio_get_output.3.adoc[`nng_aio_get_output()`].
-
-It is possible to wait synchronously for an otherwise asynchronous operation
-by using the function xref:nng_aio_wait.3.adoc[`nng_aio_wait()`].
-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
-xref:nng_aio_wait.3.adoc[`nng_aio_wait()`].
-
-== RETURN VALUES
-
-This function returns 0 on success, and non-zero otherwise.
-
-== ERRORS
-
-[horizontal]
-`NNG_ENOMEM`:: Insufficient free memory to perform the operation.
-
-== SEE ALSO
-
-[.text-left]
-xref:nng_aio_abort.3.adoc[nng_aio_abort(3)],
-xref:nng_aio_cancel.3.adoc[nng_aio_cancel(3)],
-xref:nng_aio_count.3.adoc[nng_aio_count(3)],
-xref:nng_aio_free.3.adoc[nng_aio_free(3)],
-xref:nng_aio_get_input.3.adoc[nng_aio_get_input(3)],
-xref:nng_aio_get_msg.3.adoc[nng_aio_get_msg(3)],
-xref:nng_aio_get_output.3.adoc[nng_aio_get_output(3)],
-xref:nng_aio_result.3.adoc[nng_aio_result(3)],
-xref:nng_aio_set_input.3.adoc[nng_aio_set_input(3)],
-xref:nng_aio_set_iov.3.adoc[nng_aio_set_iov(3)],
-xref:nng_aio_set_msg.3.adoc[nng_aio_set_msg(3)],
-xref:nng_aio_set_timeout.3.adoc[nng_aio_set_timeout(3)],
-xref:nng_aio_stop.3.adoc[nng_aio_stop(3)],
-xref:nng_aio_wait.3.adoc[nng_aio_wait(3)],
-xref:nng_strerror.3.adoc[nng_strerror(3)],
-xref:nng_aio.5.adoc[nng_aio(5)],
-xref:nng.7.adoc[nng(7)]
diff --git a/docs/man/nng_aio_busy.3.adoc b/docs/man/nng_aio_busy.3.adoc
deleted file mode 100644
index 4aaf09b5..00000000
--- a/docs/man/nng_aio_busy.3.adoc
+++ /dev/null
@@ -1,56 +0,0 @@
-= nng_aio_busy(3)
-//
-// Copyright 2022 Staysail Systems, Inc. <info@staysail.tech>
-//
-// This document is supplied under the terms of the MIT License, a
-// copy of which should be located in the distribution where this
-// file was obtained (LICENSE.txt). A copy of the license may also be
-// found online at https://opensource.org/licenses/MIT.
-//
-
-== NAME
-
-nng_aio_busy - test if asynchronous I/O is busy
-
-== SYNOPSIS
-
-[source, c]
-----
-#include <nng/nng.h>
-
-bool nng_aio_busy(nng_aio *aio);
-----
-
-== DESCRIPTION
-
-The `nng_aio_busy()` function returns true if the
-_aio_ is currently busy performing an asynchronous I/O
-operation or is executing a completion callback.
-
-If no operation has been started, or the operation has
-been completed or canceled, and any callback has been
-executed, then it returns false.
-
-This is the same test used internally by
-xref:nng_aio_wait.3.adoc[`nng_aio_wait()`]
-
-NOTE: Care should be taken to ensure that the _aio_ object is not
-freed when using this function. The caller is responsible for
-coordinating any use of this with any reuse of the _aio_.
-
-== RETURN VALUES
-
-True if the _aio_ is busy, false otherwise.
-
-== ERRORS
-
-None.
-
-== SEE ALSO
-
-[.text-left]
-xref:nng_aio_abort.3.adoc[nng_aio_abort(3)],
-xref:nng_aio_alloc.3.adoc[nng_aio_alloc(3)],
-xref:nng_aio_wait.3.adoc[nng_aio_wait(3)],
-xref:nng_aio.5.adoc[nng_aio(5)],
-xref:nng.7.adoc[nng(7)]
diff --git a/docs/man/nng_aio_cancel.3.adoc b/docs/man/nng_aio_cancel.3.adoc
deleted file mode 100644
index 3b32c827..00000000
--- a/docs/man/nng_aio_cancel.3.adoc
+++ /dev/null
@@ -1,58 +0,0 @@
-= nng_aio_cancel(3)
-//
-// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
-// Copyright 2018 Capitar IT Group BV <info@capitar.com>
-//
-// This document is supplied under the terms of the MIT License, a
-// copy of which should be located in the distribution where this
-// file was obtained (LICENSE.txt). A copy of the license may also be
-// found online at https://opensource.org/licenses/MIT.
-//
-
-== NAME
-
-nng_aio_cancel - cancel asynchronous I/O operation
-
-== SYNOPSIS
-
-[source, c]
-----
-#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
-xref:nng_aio_result.3.adoc[`nng_aio_result()`] 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.
-
-NOTE: This function is the same as calling
-xref:nng_aio_abort.3.adoc[`nng_aio_abort()`] with the error `NNG_ECANCELED`.
-
-== RETURN VALUES
-
-None.
-
-== ERRORS
-
-None.
-
-== SEE ALSO
-
-[.text-left]
-xref:nng_aio_abort.3.adoc[nng_aio_abort(3)],
-xref:nng_aio_alloc.3.adoc[nng_aio_alloc(3)],
-xref:nng_aio_result.3.adoc[nng_aio_result(3)],
-xref:nng_aio.5.adoc[nng_aio(5)],
-xref:nng.7.adoc[nng(7)]
diff --git a/docs/man/nng_aio_count.3.adoc b/docs/man/nng_aio_count.3.adoc
deleted file mode 100644
index daf97710..00000000
--- a/docs/man/nng_aio_count.3.adoc
+++ /dev/null
@@ -1,61 +0,0 @@
-= nng_aio_count(3)
-//
-// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
-// Copyright 2018 Capitar IT Group BV <info@capitar.com>
-//
-// This document is supplied under the terms of the MIT License, a
-// copy of which should be located in the distribution where this
-// file was obtained (LICENSE.txt). A copy of the license may also be
-// found online at https://opensource.org/licenses/MIT.
-//
-
-== NAME
-
-nng_aio_count - return number of bytes transferred
-
-== SYNOPSIS
-
-[source, c]
-----
-#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 xref:nng_aio_set_iov.3.adoc[`nng_aio_set_iov()`]).
-
-NOTE: 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
-xref:nng_aio_wait.3.adoc[`nng_aio_wait()`].
-
-== RETURN VALUES
-
-The number of bytes transferred by the operation.
-
-== ERRORS
-
-None.
-
-== SEE ALSO
-
-[.text-left]
-xref:nng_aio_alloc.3.adoc[nng_aio_alloc(3)],
-xref:nng_aio_result.3.adoc[nng_aio_result(3)],
-xref:nng_aio_set_iov.3.adoc[nng_aio_set_iov(3)],
-xref:nng_aio_wait.3.adoc[nng_aio_wait(3)],
-xref:nng_strerror.3.adoc[nng_strerror(3)],
-xref:nng_aio.5.adoc[nng_aio(5)],
-xref:nng.7.adoc[nng(7)]
diff --git a/docs/man/nng_aio_free.3.adoc b/docs/man/nng_aio_free.3.adoc
deleted file mode 100644
index c2528633..00000000
--- a/docs/man/nng_aio_free.3.adoc
+++ /dev/null
@@ -1,54 +0,0 @@
-= nng_aio_free(3)
-//
-// Copyright 2020 Staysail Systems, Inc. <info@staysail.tech>
-// Copyright 2018 Capitar IT Group BV <info@capitar.com>
-//
-// This document is supplied under the terms of the MIT License, a
-// copy of which should be located in the distribution where this
-// file was obtained (LICENSE.txt). A copy of the license may also be
-// found online at https://opensource.org/licenses/MIT.
-//
-
-== NAME
-
-nng_aio_free - free asynchronous I/O handle
-
-== SYNOPSIS
-
-[source, c]
-----
-#include <nng/nng.h>
-
-void nng_aio_free(nng_aio *aio);
-void nng_aio_reap(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 xref:nng_aio_stop.3.adoc[`nng_aio_stop()`].)
-
-The `nng_aio_reap()` function is the same as `nng_aio_free()`, but does
-its work in a background thread.
-This can be useful to discard the _aio_ object from within the callback for the _aio_.
-
-IMPORTANT: Once either of these functions are called, the _aio_ object is invalid and must not be used again.
-
-== RETURN VALUES
-
-None.
-
-== ERRORS
-
-None.
-
-== SEE ALSO
-
-[.text-left]
-xref:nng_aio_alloc.3.adoc[nng_aio_alloc(3)],
-xref:nng_aio_stop.3.adoc[nng_aio_stop(3)],
-xref:nng_aio.5.adoc[nng_aio(5)],
-xref:nng.7.adoc[nng(7)]
diff --git a/docs/man/nng_aio_get_msg.3.adoc b/docs/man/nng_aio_get_msg.3.adoc
deleted file mode 100644
index c4205658..00000000
--- a/docs/man/nng_aio_get_msg.3.adoc
+++ /dev/null
@@ -1,49 +0,0 @@
-= nng_aio_get_msg(3)
-//
-// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
-// Copyright 2018 Capitar IT Group BV <info@capitar.com>
-//
-// This document is supplied under the terms of the MIT License, a
-// copy of which should be located in the distribution where this
-// file was obtained (LICENSE.txt). A copy of the license may also be
-// found online at https://opensource.org/licenses/MIT.
-//
-
-== NAME
-
-nng_aio_get_msg - get message from asynchronous receive
-
-== SYNOPSIS
-
-[source, c]
-----
-#include <nng/nng.h>
-
-nng_msg *nng_aio_get_msg(nng_aio *aio);
-----
-
-== DESCRIPTION
-
-The `nng_aio_get_msg()` function gets any message stored in _aio_ as
-either a result of a successful receive
-(see xref:nng_recv_aio.3.adoc[`nng_recv_aio()`])
-or that was previously stored with xref:nng_aio_set_msg.3.adoc[`nng_aio_set_msg()`].
-
-IMPORTANT: The xref:nng_aio.5.adoc[`nng_aio`] must not have an operation in progress.
-
-== RETURN VALUES
-
-None.
-
-== ERRORS
-
-None.
-
-== SEE ALSO
-
-[.text-left]
-xref:nng_aio_set_msg.3.adoc[nng_aio_set_msg(3)],
-xref:nng_recv_aio.3.adoc[nng_recv_aio(3)],
-xref:nng_aio.5.adoc[nng_aio(5)],
-xref:nng_msg.5.adoc[nng_msg(5)],
-xref:nng.7.adoc[nng(7)]
diff --git a/docs/man/nng_aio_get_output.3.adoc b/docs/man/nng_aio_get_output.3.adoc
deleted file mode 100644
index 4dfd67c3..00000000
--- a/docs/man/nng_aio_get_output.3.adoc
+++ /dev/null
@@ -1,56 +0,0 @@
-= nng_aio_get_output(3)
-//
-// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
-// Copyright 2018 Capitar IT Group BV <info@capitar.com>
-//
-// This document is supplied under the terms of the MIT License, a
-// copy of which should be located in the distribution where this
-// file was obtained (LICENSE.txt). A copy of the license may also be
-// found online at https://opensource.org/licenses/MIT.
-//
-
-== NAME
-
-nng_aio_get_output - return output result
-
-== SYNOPSIS
-
-[source, c]
-----
-#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.
-
-NOTE: 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`.
-
-IMPORTANT: 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 __index__th result of the operation, or `NULL`.
-
-== ERRORS
-
-None.
-
-== SEE ALSO
-
-[.text-left]
-xref:nng_aio_alloc.3.adoc[nng_aio_alloc(3)],
-xref:nng_aio_get_output.3.adoc[nng_aio_get_output(3)],
-xref:nng_aio_set_input.3.adoc[nng_aio_set_input(3)],
-xref:nng_aio_result.3.adoc[nng_aio_result(3)],
-xref:nng_aio.5.adoc[nng_aio(5)],
-xref:nng.7.adoc[nng(7)]
diff --git a/docs/man/nng_aio_result.3.adoc b/docs/man/nng_aio_result.3.adoc
deleted file mode 100644
index e1886a6e..00000000
--- a/docs/man/nng_aio_result.3.adoc
+++ /dev/null
@@ -1,59 +0,0 @@
-= nng_aio_result(3)
-//
-// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
-// Copyright 2018 Capitar IT Group BV <info@capitar.com>
-//
-// This document is supplied under the terms of the MIT License, a
-// copy of which should be located in the distribution where this
-// file was obtained (LICENSE.txt). A copy of the license may also be
-// found online at https://opensource.org/licenses/MIT.
-//
-
-== NAME
-
-nng_aio_result - return result of asynchronous operation
-
-== SYNOPSIS
-
-[source, c]
-----
-#include <nng/nng.h>
-
-int nng_aio_result(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.
-
-NOTE: 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
-xref:nng_aio_wait.3.adoc[`nng_aio_wait()`].
-
-== RETURN VALUES
-
-The result of the operation, either zero on success, or an error
-number on failure.
-
-== ERRORS
-
-[horizontal]
-`NNG_ETIMEDOUT`:: The operation timed out.
-`NNG_ECANCELED`:: The operation was canceled.
-
-Various other return values are possible depending on the operation.
-
-== SEE ALSO
-
-[.text-left]
-xref:nng_aio_abort.3.adoc[nng_aio_abort(3)],
-xref:nng_aio_alloc.3.adoc[nng_aio_alloc(3)],
-xref:nng_aio_wait.3.adoc[nng_aio_wait(3)],
-xref:nng_strerror.3.adoc[nng_strerror(3)],
-xref:nng_aio.5.adoc[nng_aio(5)],
-xref:nng.7.adoc[nng(7)]
diff --git a/docs/man/nng_aio_set_input.3.adoc b/docs/man/nng_aio_set_input.3.adoc
deleted file mode 100644
index 37cf3cdd..00000000
--- a/docs/man/nng_aio_set_input.3.adoc
+++ /dev/null
@@ -1,63 +0,0 @@
-= nng_aio_set_input(3)
-//
-// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
-// Copyright 2018 Capitar IT Group BV <info@capitar.com>
-//
-// This document is supplied under the terms of the MIT License, a
-// copy of which should be located in the distribution where this
-// file was obtained (LICENSE.txt). A copy of the license may also be
-// found online at https://opensource.org/licenses/MIT.
-//
-
-== NAME
-
-nng_aio_set_input - set input parameter
-
-== SYNOPSIS
-
-[source, c]
-----
-#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.)
-
-NOTE: If the _index_ does not correspond to a defined input for the operation,
-then this function will have no effect.
-
-IMPORTANT: 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 xref:nng_aio_get_input.3.adoc[`nng_aio_get_input()`] function.
-
-== RETURN VALUES
-
-None.
-
-== ERRORS
-
-None.
-
-== SEE ALSO
-
-[.text-left]
-xref:nng_aio_alloc.3.adoc[nng_aio_alloc(3)],
-xref:nng_aio_get_input.3.adoc[nng_aio_get_input(3)],
-xref:nng_aio_get_output.3.adoc[nng_aio_get_output(3)],
-xref:nng_aio_result.3.adoc[nng_aio_result(3)],
-xref:nng_aio.5.adoc[nng_aio(5)],
-xref:nng.7.adoc[nng(7)]
diff --git a/docs/man/nng_aio_set_iov.3.adoc b/docs/man/nng_aio_set_iov.3.adoc
deleted file mode 100644
index 83128011..00000000
--- a/docs/man/nng_aio_set_iov.3.adoc
+++ /dev/null
@@ -1,67 +0,0 @@
-= nng_aio_set_iov(3)
-//
-// Copyright 2021 Staysail Systems, Inc. <info@staysail.tech>
-// Copyright 2018 Capitar IT Group BV <info@capitar.com>
-//
-// This document is supplied under the terms of the MIT License, a
-// copy of which should be located in the distribution where this
-// file was obtained (LICENSE.txt). A copy of the license may also be
-// found online at https://opensource.org/licenses/MIT.
-//
-
-== NAME
-
-nng_aio_set_iov - set scatter/gather vector
-
-== SYNOPSIS
-
-[source,c]
-----
-#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_ xref:nng_iov.5.adoc[`nng_iov`]
-structures, which have the following definition:
-
-[source,c]
-----
- 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.
-
-A maximum of four (4) `nng_iov` members may be supplied.
-
-NOTE: Earlier versions of the library could accept longer scatter-gather lists.
-However, no known consumers have ever needed a scatter-gather list longer than 4 vectors.
-As a result, the implementation limit was reduced, and heap allocations which could fail were removed.
-
-== RETURN VALUES
-
-This function returns 0 on success, and non-zero otherwise.
-
-== ERRORS
-
-[horizontal]
-`NNG_EINVAL`:: Value of specified _niov_ is too large.
-
-== SEE ALSO
-
-[.text-left]
-xref:nng_aio_alloc.3.adoc[nng_aio_alloc(3)],
-xref:nng_aio_cancel.3.adoc[nng_aio_cancel(3)],
-xref:nng_aio_count.3.adoc[nng_aio_count(3)],
-xref:nng_aio_result.3.adoc[nng_aio_result(3)],
-xref:nng_aio.5.adoc[nng_aio(5)],
-xref:nng_iov.5.adoc[nng_iov(5)],
-xref:nng.7.adoc[nng(7)]
diff --git a/docs/man/nng_aio_set_msg.3.adoc b/docs/man/nng_aio_set_msg.3.adoc
deleted file mode 100644
index e0ea3e46..00000000
--- a/docs/man/nng_aio_set_msg.3.adoc
+++ /dev/null
@@ -1,47 +0,0 @@
-= nng_aio_set_msg(3)
-//
-// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
-// Copyright 2018 Capitar IT Group BV <info@capitar.com>
-//
-// This document is supplied under the terms of the MIT License, a
-// copy of which should be located in the distribution where this
-// file was obtained (LICENSE.txt). A copy of the license may also be
-// found online at https://opensource.org/licenses/MIT.
-//
-
-== NAME
-
-nng_aio_set_msg - set message for asynchronous send
-
-== SYNOPSIS
-
-[source, c]
-----
-#include <nng/nng.h>
-
-void nng_aio_set_msg(nng_aio *aio, nng_msg *msg);
-----
-
-== DESCRIPTION
-
-The `nng_aio_set_msg()` function sets the message that will be used
-for an asynchronous send operation (see xref:nng_send_aio.3.adoc[`nng_send_aio()`]).
-
-IMPORTANT: The xref:nng_aio.5.adoc[`nng_aio`] must not have an operation in progress.
-
-== RETURN VALUES
-
-None.
-
-== ERRORS
-
-None.
-
-== SEE ALSO
-
-[.text-left]
-xref:nng_aio_get_msg.3.adoc[nng_aio_get_msg(3)],
-xref:nng_send_aio.3.adoc[nng_send_aio(3)],
-xref:nng_aio.5.adoc[nng_aio(5)],
-xref:nng_msg.5.adoc[nng_msg(5)],
-xref:nng.7.adoc[nng(7)]
diff --git a/docs/man/nng_aio_set_timeout.3.adoc b/docs/man/nng_aio_set_timeout.3.adoc
deleted file mode 100644
index a82b0c83..00000000
--- a/docs/man/nng_aio_set_timeout.3.adoc
+++ /dev/null
@@ -1,74 +0,0 @@
-= nng_aio_set_timeout(3)
-//
-// Copyright 2023 Staysail Systems, Inc. <info@staysail.tech>
-// Copyright 2018 Capitar IT Group BV <info@capitar.com>
-//
-// This document is supplied under the terms of the MIT License, a
-// copy of which should be located in the distribution where this
-// file was obtained (LICENSE.txt). A copy of the license may also be
-// found online at https://opensource.org/licenses/MIT.
-//
-
-== NAME
-
-nng_aio_set_timeout - set asynchronous I/O timeout
-
-== SYNOPSIS
-
-[source, c]
-----
-#include <nng/nng.h>
-
-typedef int nng_duration;
-void nng_aio_set_timeout(nng_aio *aio, nng_duration timeout);
-
-typedef uint64_t nng_time;
-void nng_aio_set_expire(nng_aio *aio, nng_time expiration);
-----
-
-== DESCRIPTION
-
-The `nng_aio_set_timeout()` function sets a _timeout_(((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`.)
-
-The `nng_aio_set_expire()` function is similar to `nng_aio_set_timeout()`, but sets
-an absolute expiration time based on the system clock. The _expiration_
-is expressed as a number of milliseconds since some point in the past.
-The xref:nng_clock.3supp.adoc[`nng_clock()`] function can be used to determine
-the current value of the clock.
-
-TIP: 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.
-
-== SEE ALSO
-
-[.text-left]
-xref:nng_aio_alloc.3.adoc[nng_aio_alloc(3)],
-xref:nng_aio_cancel.3.adoc[nng_aio_cancel(3)],
-xref:nng_aio_result.3.adoc[nng_aio_result(3)],
-xref:nng_aio.5.adoc[nng_aio(5)],
-xref:nng_duration.5.adoc[nng_duration(5)],
-xref:nng.7.adoc[nng(7)]
diff --git a/docs/man/nng_aio_stop.3.adoc b/docs/man/nng_aio_stop.3.adoc
deleted file mode 100644
index d5037c51..00000000
--- a/docs/man/nng_aio_stop.3.adoc
+++ /dev/null
@@ -1,60 +0,0 @@
-= nng_aio_stop(3)
-//
-// Copyright 2024 Staysail Systems, Inc. <info@staysail.tech>
-// Copyright 2018 Capitar IT Group BV <info@capitar.com>
-//
-// This document is supplied under the terms of the MIT License, a
-// copy of which should be located in the distribution where this
-// file was obtained (LICENSE.txt). A copy of the license may also be
-// found online at https://opensource.org/licenses/MIT.
-//
-
-== NAME
-
-nng_aio_stop - stop asynchronous I/O operation
-
-== SYNOPSIS
-
-[source, c]
-----
-#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, and for the
-callback associated with the _aio_ to have completed executing.
-
-Further calls to
-xref:nng_aio_begin.3.adoc[`nng_aio_begin()`] using this _aio_ will return false.
-
-It is safe to call this for an _aio_, even when no operation is currently
-pending for it.
-
-TIP: 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
-them with xref:nng_aio_free.3.adoc[`nng_aio_free()`], particularly if the callbacks
-might attempt to reschedule additional operations.
-
-== RETURN VALUES
-
-None.
-
-== ERRORS
-
-None.
-
-== SEE ALSO
-
-[.text-left]
-xref:nng_aio_alloc.3.adoc[nng_aio_alloc(3)],
-xref:nng_aio_cancel.3.adoc[nng_aio_cancel(3)],
-xref:nng_aio_free.3.adoc[nng_aio_free(3)],
-xref:nng_aio_begin.3.adoc[nng_aio_begin(3)],
-xref:nng_aio_wait.3.adoc[nng_aio_wait(3)],
-xref:nng_aio.5.adoc[nng_aio(5)],
-xref:nng.7.adoc[nng(7)]
diff --git a/docs/man/nng_aio_wait.3.adoc b/docs/man/nng_aio_wait.3.adoc
deleted file mode 100644
index acac6fdf..00000000
--- a/docs/man/nng_aio_wait.3.adoc
+++ /dev/null
@@ -1,54 +0,0 @@
-= nng_aio_wait(3)
-//
-// Copyright 2023 Staysail Systems, Inc. <info@staysail.tech>
-// Copyright 2018 Capitar IT Group BV <info@capitar.com>
-//
-// This document is supplied under the terms of the MIT License, a
-// copy of which should be located in the distribution where this
-// file was obtained (LICENSE.txt). A copy of the license may also be
-// found online at https://opensource.org/licenses/MIT.
-//
-
-== NAME
-
-nng_aio_wait - wait for asynchronous I/O operation
-
-== SYNOPSIS
-
-[source, c]
-----
-#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 a callback was set with _aio_ when it was allocated, then this
-function will not be called until the callback has completed.
-
-IMPORTANT: This function should never be called from a function that itself
-is a callback of an xref:nng_aio.5.adoc[`aio`], either this one or any other.
-Doing so may result in a deadlock.
-
-== RETURN VALUES
-
-None.
-
-== ERRORS
-
-None.
-
-== SEE ALSO
-
-[.text-left]
-xref:nng_aio_abort.3.adoc[nng_aio_abort(3)],
-xref:nng_aio_alloc.3.adoc[nng_aio_alloc(3)],
-xref:nng_aio_busy.3.adoc[nng_aio_busy(3)],
-xref:nng_aio.5.adoc[nng_aio(5)],
-xref:nng.7.adoc[nng(7)]
diff --git a/docs/ref/aio/nng_aio_abort.adoc b/docs/ref/aio/nng_aio_abort.adoc
new file mode 100644
index 00000000..58faac9f
--- /dev/null
+++ b/docs/ref/aio/nng_aio_abort.adoc
@@ -0,0 +1,26 @@
+## nng_aio_abort
+
+Abort asynchronous I/O operation.
+
+### Synopsis
+
+```c
+#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 xref:nng_aio_result.adoc[`nng_aio_result`] will return the error _err_.
+
+This function does not wait for the operation to abort, 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.
+
+### See Also
+
+xref:nng_aio_alloc.adoc[nng_aio_alloc],
+xref:nng_aio_cancel.adoc[nng_aio_cancel],
+xref:nng_aio_result.adoc[nng_aio_result]
diff --git a/docs/ref/aio/nng_aio_alloc.adoc b/docs/ref/aio/nng_aio_alloc.adoc
new file mode 100644
index 00000000..65408674
--- /dev/null
+++ b/docs/ref/aio/nng_aio_alloc.adoc
@@ -0,0 +1,58 @@
+## nng_aio_alloc
+
+Allocate asynchronous I/O handle.
+
+### Synopsis
+
+```c
+#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_.
+
+NOTE: The callback _callb_ must not perform any blocking operations, and must complete its execution quickly.
+If _callb_ does block, this can lead ultimately to an apparent "hang" or deadlock in the application.
+This also means you should avoid operations such as allocating new objects, which also means opening or closing sockets, dialers, and so forth.
+
+TIP: If more complex or blocking work needs to be performed by _callb_, a separate thread can be used, along with a xref:../thr/nng_cv_alloc.adoc[condition variable] which can be signaled by the callback.
+
+Asynchronous I/O operations all take an xref:nng_aio.adoc[`nng_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 xref:nng_aio_result.adoc[`nng_aio_result`], xref:nng_aio_count.adoc[`nng_aio_count`], and xref:nng_aio_get_output.adoc[`nng_aio_get_output`].
+
+It is possible to wait synchronously for an otherwise asynchronous operation by using the function xref:nng_aio_wait.adoc[`nng_aio_wait`].
+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`.
+
+### Return Values
+
+This function returns 0 on success, and non-zero otherwise.
+
+### Errors
+
+[horizontal]
+`NNG_ENOMEM`:: Insufficient free memory to perform the operation.
+
+### See Also
+
+xref:nng_aio_abort.adoc[nng_aio_abort],
+xref:nng_aio_cancel.adoc[nng_aio_cancel],
+xref:nng_aio_count.adoc[nng_aio_count],
+xref:nng_aio_free.adoc[nng_aio_free],
+xref:nng_aio_get_msg.adoc[nng_aio_get_msg],
+xref:nng_aio_get_output.adoc[nng_aio_get_output],
+xref:nng_aio_result.adoc[nng_aio_result],
+xref:nng_aio_set_input.adoc[nng_aio_set_input],
+xref:nng_aio_set_iov.adoc[nng_aio_set_iov],
+xref:nng_aio_set_msg.adoc[nng_aio_set_msg],
+xref:nng_aio_set_timeout.adoc[nng_aio_set_timeout],
+xref:nng_aio_stop.adoc[nng_aio_stop],
+xref:nng_aio_wait.adoc[nng_aio_wait]
diff --git a/docs/ref/aio/nng_aio_busy.adoc b/docs/ref/aio/nng_aio_busy.adoc
new file mode 100644
index 00000000..7871adb5
--- /dev/null
+++ b/docs/ref/aio/nng_aio_busy.adoc
@@ -0,0 +1,33 @@
+## nng_aio_busy
+
+Test if asynchronous I/O is busy.
+
+### Synopsis
+
+```c
+#include <nng/nng.h>
+
+bool nng_aio_busy(nng_aio *aio);
+```
+
+### Description
+
+The `nng_aio_busy` function returns true if the _aio_ is currently busy performing an asynchronous I/O operation or is executing a completion callback.
+
+If no operation has been started, or the operation has been completed or canceled, and any callback has been executed, then it returns false.
+
+This is the same test used internally by xref:nng_aio_wait.3.adoc[`nng_aio_wait`]
+
+IMPORTANT: Care should be taken to ensure that the _aio_ object is not
+freed when using this function. The caller is responsible for
+coordinating any use of this with any reuse of the _aio_.
+
+### Return Values
+
+This function `true` if the _aio_ is busy, `false` otherwise.
+
+### See Also
+
+xref:nng_aio_abort.adoc[nng_aio_abort],
+xref:nng_aio_alloc.adoc[nng_aio_alloc],
+xref:nng_aio_wait.adoc[nng_aio_wait]
diff --git a/docs/ref/aio/nng_aio_cancel.adoc b/docs/ref/aio/nng_aio_cancel.adoc
new file mode 100644
index 00000000..0af06c6e
--- /dev/null
+++ b/docs/ref/aio/nng_aio_cancel.adoc
@@ -0,0 +1,29 @@
+## nng_aio_cancel
+
+Cancel asynchronous I/O operation.
+
+### Synopsis
+
+```c
+#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 xref:nng_aio_result.adoc[`nng_aio_result`] 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
+xref:nng_aio_abort.adoc[`nng_aio_abort`] with the error `NNG_ECANCELED`.
+
+## See Also
+
+xref:nng_aio_abort.adoc[nng_aio_abort],
+xref:nng_aio_result.adoc[nng_aio_result],
+xref:nng_aio_wait.adoc[nng_aio_wait]
diff --git a/docs/ref/aio/nng_aio_count.adoc b/docs/ref/aio/nng_aio_count.adoc
new file mode 100644
index 00000000..a2e40d44
--- /dev/null
+++ b/docs/ref/aio/nng_aio_count.adoc
@@ -0,0 +1,35 @@
+## nng_aio_count
+
+Return number of bytes transferred.
+
+### Synopsis
+
+```c
+#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 xref:nng_aio_set_iov.adoc[`nng_aio_set_iov`]).
+
+NOTE: 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 xref:nng_aio_wait.adoc[`nng_aio_wait`].
+
+### Return Values
+
+The number of bytes transferred by the operation.
+
+### See Also
+
+xref:nng_aio_result.adoc[nng_aio_result],
+xref:nng_aio_set_iov.adoc[nng_aio_set_iov],
+xref:nng_aio_wait.adoc[nng_aio_wait] \ No newline at end of file
diff --git a/docs/ref/aio/nng_aio_free.adoc b/docs/ref/aio/nng_aio_free.adoc
new file mode 100644
index 00000000..59a0dfc6
--- /dev/null
+++ b/docs/ref/aio/nng_aio_free.adoc
@@ -0,0 +1,28 @@
+## nng_aio_free
+
+Free asynchronous I/O handle.
+
+### Synopsis
+
+```c
+#include <nng/nng.h>
+
+void nng_aio_free(nng_aio *aio);
+void nng_aio_reap(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 xref:nng_aio_stop.adoc[`nng_aio_stop`].)
+
+The `nng_aio_reap` function is the same as `nng_aio_free`, but does its work in a background thread.
+This can be useful to discard the _aio_ object from within the callback for the _aio_.
+
+IMPORTANT: Once either of these functions are called, the _aio_ object is invalid and must not be used again.
+
+### See Also
+
+xref:nng_aio_alloc.adoc[nng_aio_alloc],
+xref:nng_aio_stop.adoc[nng_aio_stop],
diff --git a/docs/ref/aio/nng_aio_get_msg.adoc b/docs/ref/aio/nng_aio_get_msg.adoc
new file mode 100644
index 00000000..a3afe6a5
--- /dev/null
+++ b/docs/ref/aio/nng_aio_get_msg.adoc
@@ -0,0 +1,23 @@
+## nng_aio_get_msg
+
+Cet message from asynchronous receive
+
+### Synopsis
+
+```c
+#include <nng/nng.h>
+
+nng_msg *nng_aio_get_msg(nng_aio *aio);
+```
+
+### Description
+
+The `nng_aio_get_msg` function gets any message stored in _aio_ as either a result of a successful receive
+(see xref:nng_recv_aio.3.adoc[`nng_recv_aio`])
+or that was previously stored with xref:nng_aio_set_msg.adoc[`nng_aio_set_msg`].
+
+### See Also
+
+xref:nng_aio_set_msg.adoc[nng_aio_set_msg],
+xref:../sock/nng_recv_aio.adoc[nng_recv_aio],
+xref:nng_msg.5.adoc[nng_msg]
diff --git a/docs/ref/aio/nng_aio_get_output.adoc b/docs/ref/aio/nng_aio_get_output.adoc
new file mode 100644
index 00000000..8b8f33c6
--- /dev/null
+++ b/docs/ref/aio/nng_aio_get_output.adoc
@@ -0,0 +1,28 @@
+## nng_aio_get_output
+
+return output result
+
+### Synopsis
+
+```c
+#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`.
+
+### Return Values
+
+The __index__th result of the operation, or `NULL`.
+
+### See Also
+
+xref:../iop/nng_aio_set_input.adoc[nng_aio_set_input],
+xref:nng_aio_result.adoc[nng_aio_result]
diff --git a/docs/ref/aio/nng_aio_result.adoc b/docs/ref/aio/nng_aio_result.adoc
new file mode 100644
index 00000000..0806cd99
--- /dev/null
+++ b/docs/ref/aio/nng_aio_result.adoc
@@ -0,0 +1,37 @@
+## nng_aio_result
+
+Return result of asynchronous operation.
+
+### Synopsis
+
+```c
+#include <nng/nng.h>
+
+int nng_aio_result(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.
+
+NOTE: 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 xref:nng_aio_wait.3.adoc[`nng_aio_wait`].
+
+### Return Values
+
+The result of the operation, either zero on success, or an error number on failure.
+
+### Errors
+
+[horizontal]
+`NNG_ETIMEDOUT`:: The operation timed out.
+`NNG_ECANCELED`:: The operation was canceled.
+
+Various other return values are possible depending on the operation.
+
+### See Also
+
+xref:nng_aio_abort.adoc[nng_aio_abort],
+xref:nng_aio_wait.adoc[nng_aio_wait]
diff --git a/docs/ref/aio/nng_aio_set_input.adoc b/docs/ref/aio/nng_aio_set_input.adoc
new file mode 100644
index 00000000..7fecc58d
--- /dev/null
+++ b/docs/ref/aio/nng_aio_set_input.adoc
@@ -0,0 +1,36 @@
+## nng_aio_set_input
+
+Set input parameter.
+
+### Synopsis
+
+```c
+#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.
+
+NOTE: If the _index_ does not correspond to a defined input for the operation,
+then this function will have no effect.
+
+IMPORTANT: 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 xref:../iop/nng_aio_get_input.adoc[`nng_aio_get_input`] function.
+
+### See Also
+
+xref:../iop/nng_aio_get_input.adoc[nng_aio_get_input],
+xref:nng_aio_get_output.adoc[nng_aio_get_output],
+xref:nng_aio_result.adoc[nng_aio_result]
diff --git a/docs/ref/aio/nng_aio_set_iov.adoc b/docs/ref/aio/nng_aio_set_iov.adoc
new file mode 100644
index 00000000..b4938fcc
--- /dev/null
+++ b/docs/ref/aio/nng_aio_set_iov.adoc
@@ -0,0 +1,49 @@
+## nng_aio_set_iov
+
+set scatter/gather vector
+
+### Synopsis
+
+```c
+#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_ xref:nng_iov.5.adoc[`nng_iov`] structures, which have the following definition:
+
+```c
+ 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.
+
+A maximum of four (4) `nng_iov` members may be supplied.
+
+NOTE: Earlier versions of the library could accept longer scatter-gather lists.
+However, no known consumers have ever needed a scatter-gather list longer than 4 vectors.
+As a result, the implementation limit was reduced, and heap allocations which could fail were removed.
+
+### Return Values
+
+This function returns 0 on success, and non-zero otherwise.
+
+### Errors
+
+[horizontal]
+`NNG_EINVAL`:: Value of specified _niov_ is too large.
+
+### See Also
+
+[.text-left]
+xref:nng_aio_count.adoc[nng_aio_count],
+xref:nng_aio_result.adoc[nng_aio_result],
+xref:nng_iov.5.adoc[nng_iov]
diff --git a/docs/ref/aio/nng_aio_set_msg.adoc b/docs/ref/aio/nng_aio_set_msg.adoc
new file mode 100644
index 00000000..7dc06841
--- /dev/null
+++ b/docs/ref/aio/nng_aio_set_msg.adoc
@@ -0,0 +1,23 @@
+## nng_aio_set_msg
+
+Set message for asynchronous send.
+
+### Synopsis
+
+```c
+#include <nng/nng.h>
+
+void nng_aio_set_msg(nng_aio *aio, nng_msg *msg);
+```
+
+### Description
+
+The `nng_aio_set_msg` function sets the message that will be used for an asynchronous send operation (see xref:../sock/nng_send_aio.adoc[`nng_send_aio`]).
+
+
+### See Also
+
+[.text-left]
+xref:nng_aio_get_msg.adoc[nng_aio_get_msg],
+xref:../sock/nng_send_aio.adoc[nng_send_aio],
+xref:nng_msg.adoc[nng_msg]
diff --git a/docs/ref/aio/nng_aio_set_timeout.adoc b/docs/ref/aio/nng_aio_set_timeout.adoc
new file mode 100644
index 00000000..9f734310
--- /dev/null
+++ b/docs/ref/aio/nng_aio_set_timeout.adoc
@@ -0,0 +1,42 @@
+## nng_aio_set_timeout
+
+Set asynchronous I/O timeout.
+
+### Synopsis
+
+```c
+#include <nng/nng.h>
+
+typedef int nng_duration;
+void nng_aio_set_timeout(nng_aio *aio, nng_duration timeout);
+
+typedef uint64_t nng_time;
+void nng_aio_set_expire(nng_aio *aio, nng_time expiration);
+```
+
+### Description
+
+The `nng_aio_set_timeout` function sets a _timeout_(((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`.)
+
+The `nng_aio_set_expire` function is similar to `nng_aio_set_timeout`, but sets an absolute expiration time based on the system clock.
+The _expiration_ is expressed as a number of milliseconds since some point in the past.
+The xref:../util/nng_clock.adoc[`nng_clock`] function can be used to determine the current value of the clock.
+
+TIP: As most operations involve some context switching, it is usually a good idea to allow at least a few dozen milliseconds before timing them out.
+A very short timeout might not allow the operation to properly begin before giving up!
+
+The value of _timeout_ set for the _aio_ is persistent.
+If the handle is reused for multiple operations, they will have the same relative timeout.
+
+### See Also
+
+xref:nng_aio_cancel.adoc[nng_aio_cancel],
+xref:nng_aio_result.adoc[nng_aio_result],
+xref:../util/nng_clock.adoc[nng_clock]
diff --git a/docs/ref/aio/nng_aio_stop.adoc b/docs/ref/aio/nng_aio_stop.adoc
new file mode 100644
index 00000000..01226501
--- /dev/null
+++ b/docs/ref/aio/nng_aio_stop.adoc
@@ -0,0 +1,30 @@
+## nng_aio_stop
+
+Stop asynchronous I/O operation.
+
+### Synopsis
+
+```c
+#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, and for the callback associated with the _aio_ to have completed executing.
+
+Further calls to
+xref:../iop/nng_aio_begin.adoc[`nng_aio_begin`] using this _aio_ will return false.
+
+It is safe to call this for an _aio_, even when no operation is currently pending for it.
+
+TIP: 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 them with xref:nng_aio_free.adoc[`nng_aio_free`].
+This is particularly true if the callbacks might attempt to reschedule additional operations.
+
+### See Also
+
+xref:nng_aio_cancel.adoc[nng_aio_cancel],
+xref:nng_aio_free..adoc[nng_aio_free],
+xref:../iop/nng_aio_begin.adoc[nng_aio_begin],
+xref:nng_aio_wait.adoc[nng_aio_wait]
diff --git a/docs/ref/aio/nng_aio_wait.adoc b/docs/ref/aio/nng_aio_wait.adoc
new file mode 100644
index 00000000..9c74c494
--- /dev/null
+++ b/docs/ref/aio/nng_aio_wait.adoc
@@ -0,0 +1,28 @@
+## nng_aio_wait
+
+Wait for asynchronous I/O operation.
+
+### Synopsis
+
+```c
+#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 a callback was set with _aio_ when it was allocated, then this function will not be called until the callback has completed.
+
+IMPORTANT: This function should never be called from a function that itself
+is a callback of an xref:nng_aio.adoc[`aio`], either this one or any other.
+Doing so may result in a deadlock.
+
+
+### See ALso
+
+xref:nng_aio_abort.adoc[nng_aio_abort],
+xref:nng_aio_busy.adoc[nng_aio_busy]