summaryrefslogtreecommitdiff
path: root/docs/reference/src/sock/nng_send_aio.3.adoc
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-03-31 11:28:24 -0700
committerGarrett D'Amore <garrett@damore.org>2024-03-31 11:28:24 -0700
commit309583d7b4171cf6851d4ba89e07909642180015 (patch)
treebf64e74e9666038e71db0c7826fe706977627cd8 /docs/reference/src/sock/nng_send_aio.3.adoc
parent1bcf60a65ee56054e638c0859da1fe2418160bc6 (diff)
downloadnng-mdbook.tar.gz
nng-mdbook.tar.bz2
nng-mdbook.zip
nng_send*mdbook
Diffstat (limited to 'docs/reference/src/sock/nng_send_aio.3.adoc')
-rw-r--r--docs/reference/src/sock/nng_send_aio.3.adoc81
1 files changed, 0 insertions, 81 deletions
diff --git a/docs/reference/src/sock/nng_send_aio.3.adoc b/docs/reference/src/sock/nng_send_aio.3.adoc
deleted file mode 100644
index 4597619c..00000000
--- a/docs/reference/src/sock/nng_send_aio.3.adoc
+++ /dev/null
@@ -1,81 +0,0 @@
-# nng_send_aio
-
-## NAME
-
-nng_send_aio --- send message asynchronously
-
-## SYNOPSIS
-
-```
-#include <nng/nng.h>
-
-void nng_send_aio(nng_socket s, nng_aio *aio);
-```
-
-## DESCRIPTION
-
-The `nng_send_aio()` sends a xref:nng_msg.5.adoc[message] using the
-xref:nng_socket.5.adoc[socket] _s_ asynchronously.
-
-The message to send must have previously been set on the _aio_
-using the xref:nng_aio_set_msg.3.adoc[`nng_aio_set_msg()`] function.
-The function assumes ownership of the message.
-
-If the message was successfully queued for delivery to the socket,
-then the _aio_ will be completed, and xref:nng_aio_result.3.adoc[`nng_aio_result()`]
-will return zero. In this case the socket will dispose of the
-message when it is finished with it.
-
-NOTE: The operation will be completed, and the callback associated
-with the _aio_ executed, as soon as the socket accepts the message
-for sending.
-This does _not_ indicate that the message was actually delivered, as it
-may still be buffered in the sending socket, buffered in the receiving
-socket, or in flight over physical media.
-
-If the operation fails for any reason (including cancellation or timeout),
-then the _aio_ callback will be executed and
-xref:nng_aio_result.3.adoc[`nng_aio_result()`]
-will return a non-zero error status.
-In this case, the callback has a responsibility to retrieve the message from
-the _aio_ with
-xref:nng_aio_get_msg.3.adoc[`nng_aio_get_msg()`] and dispose of it appropriately.
-(This may include retrying the send operation on the same or a different
-socket, or deallocating the message with xref:nng_msg_free.3.adoc[`nng_msg_free()`].)
-
-NOTE: The semantics of what sending a message means varies from protocol to
-protocol, so examination of the protocol documentation is encouraged.
-(For example, with a xref:nng_pub.7.adoc[_pub_] socket the data is broadcast, so that
-any peers who have a suitable subscription will be able to receive it using
-xref:nng_recv.3.adoc[`nng_recv()`] or a similar function.)
-Furthermore, some protocols may not support sending (such as
-xref:nng_sub.7.adoc[_sub_]) or may require other conditions.
-(For example, xref:nng_rep.7.adoc[_rep_] sockets cannot normally send data, which
-are responses to requests, until they have first received a request.)
-
-## RETURN VALUES
-
-None. (The operation completes asynchronously.)
-
-## ERRORS
-
-* `NNG_ECANCELED`: The operation was aborted.
-* `NNG_ECLOSED`: The socket _s_ is not open.
-* `NNG_EMSGSIZE`: The message is too large.
-* `NNG_ENOMEM`: Insufficient memory is available.
-* `NNG_ENOTSUP`: The protocol for socket _s_ does not support sending.
-* `NNG_ESTATE`: The socket _s_ cannot send data in this state.
-* `NNG_ETIMEDOUT`: The send timeout expired.
-
-## SEE ALSO
-
-[nng_aio_get_msg][nng_aio_get_msg],
-[nng_aio_set_msg][nng_aio_set_msg],
-[nng_msg_alloc][nng_msg_alloc],
-[nng_strerror][nng_strerror],
-[nng_aio][nng_aio],
-[nng_msg][nng_msg],
-[nng_socket][nng_socket],
-[nng][nng]
-
-{{#include ../refs.md}}