From b7083441e869da9b3c5fdfeeabd7c52f2f19df10 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 25 Feb 2018 13:57:19 -0800 Subject: man page updates for 0.2.0 --- man/v0.2.0/README.html | 15 +- man/v0.2.0/libnng.html | 36 +- man/v0.2.0/nng.html | 24 +- man/v0.2.0/nng_aio_abort.html | 24 +- man/v0.2.0/nng_aio_alloc.html | 24 +- man/v0.2.0/nng_aio_cancel.html | 24 +- man/v0.2.0/nng_aio_count.html | 24 +- man/v0.2.0/nng_aio_finish.html | 24 +- man/v0.2.0/nng_aio_free.html | 24 +- man/v0.2.0/nng_aio_get_input.html | 24 +- man/v0.2.0/nng_aio_get_output.html | 24 +- man/v0.2.0/nng_aio_result.html | 24 +- man/v0.2.0/nng_aio_set_input.html | 24 +- man/v0.2.0/nng_aio_set_iov.html | 24 +- man/v0.2.0/nng_aio_set_output.html | 24 +- man/v0.2.0/nng_aio_set_timeout.html | 24 +- man/v0.2.0/nng_aio_stop.html | 24 +- man/v0.2.0/nng_aio_wait.html | 24 +- man/v0.2.0/nng_bus.html | 25 +- man/v0.2.0/nng_close.html | 24 +- man/v0.2.0/nng_dial.html | 24 +- man/v0.2.0/nng_dialer_close.html | 24 +- man/v0.2.0/nng_dialer_create.html | 24 +- man/v0.2.0/nng_dialer_getopt.html | 24 +- man/v0.2.0/nng_dialer_setopt.html | 24 +- man/v0.2.0/nng_dialer_start.html | 24 +- man/v0.2.0/nng_http_client_alloc.html | 25 +- man/v0.2.0/nng_http_client_connect.html | 25 +- man/v0.2.0/nng_http_client_free.html | 25 +- man/v0.2.0/nng_http_client_get_tls.html | 25 +- man/v0.2.0/nng_http_client_set_tls.html | 25 +- man/v0.2.0/nng_http_conn_close.html | 25 +- man/v0.2.0/nng_http_conn_read.html | 25 +- man/v0.2.0/nng_http_conn_read_all.html | 25 +- man/v0.2.0/nng_http_conn_read_req.html | 25 +- man/v0.2.0/nng_http_conn_read_res.html | 25 +- man/v0.2.0/nng_http_conn_write.html | 25 +- man/v0.2.0/nng_http_conn_write_all.html | 25 +- man/v0.2.0/nng_http_conn_write_req.html | 25 +- man/v0.2.0/nng_http_conn_write_res.html | 25 +- man/v0.2.0/nng_http_handler_alloc.html | 25 +- man/v0.2.0/nng_http_handler_free.html | 25 +- man/v0.2.0/nng_http_handler_get_data.html | 25 +- man/v0.2.0/nng_http_handler_set_data.html | 25 +- man/v0.2.0/nng_http_handler_set_host.html | 25 +- man/v0.2.0/nng_http_handler_set_method.html | 25 +- man/v0.2.0/nng_http_handler_set_tree.html | 25 +- man/v0.2.0/nng_http_hijack.html | 25 +- man/v0.2.0/nng_http_req_add_header.html | 25 +- man/v0.2.0/nng_http_req_alloc.html | 25 +- man/v0.2.0/nng_http_req_copy_data.html | 25 +- man/v0.2.0/nng_http_req_del_header.html | 25 +- man/v0.2.0/nng_http_req_free.html | 25 +- man/v0.2.0/nng_http_req_get_header.html | 25 +- man/v0.2.0/nng_http_req_get_method.html | 25 +- man/v0.2.0/nng_http_req_get_uri.html | 25 +- man/v0.2.0/nng_http_req_get_version.html | 25 +- man/v0.2.0/nng_http_req_set_data.html | 25 +- man/v0.2.0/nng_http_req_set_header.html | 25 +- man/v0.2.0/nng_http_req_set_method.html | 25 +- man/v0.2.0/nng_http_req_set_uri.html | 25 +- man/v0.2.0/nng_http_req_set_version.html | 25 +- man/v0.2.0/nng_http_res_add_header.html | 25 +- man/v0.2.0/nng_http_res_alloc.html | 25 +- man/v0.2.0/nng_http_res_alloc_error.html | 25 +- man/v0.2.0/nng_http_res_copy_data.html | 25 +- man/v0.2.0/nng_http_res_del_header.html | 25 +- man/v0.2.0/nng_http_res_free.html | 25 +- man/v0.2.0/nng_http_res_get_header.html | 25 +- man/v0.2.0/nng_http_res_get_reason.html | 25 +- man/v0.2.0/nng_http_res_get_status.html | 25 +- man/v0.2.0/nng_http_res_get_version.html | 25 +- man/v0.2.0/nng_http_res_set_data.html | 25 +- man/v0.2.0/nng_http_res_set_header.html | 25 +- man/v0.2.0/nng_http_res_set_reason.html | 25 +- man/v0.2.0/nng_http_res_set_status.html | 25 +- man/v0.2.0/nng_http_res_set_version.html | 25 +- man/v0.2.0/nng_http_server_add_handler.html | 25 +- man/v0.2.0/nng_http_server_del_handler.html | 25 +- man/v0.2.0/nng_http_server_get_tls.html | 25 +- man/v0.2.0/nng_http_server_hold.html | 25 +- man/v0.2.0/nng_http_server_release.html | 25 +- man/v0.2.0/nng_http_server_set_tls.html | 25 +- man/v0.2.0/nng_http_server_start.html | 25 +- man/v0.2.0/nng_http_server_stop.html | 25 +- man/v0.2.0/nng_inproc.html | 24 +- man/v0.2.0/nng_ipc.html | 24 +- man/v0.2.0/nng_listen.html | 24 +- man/v0.2.0/nng_listener_close.html | 24 +- man/v0.2.0/nng_listener_create.html | 24 +- man/v0.2.0/nng_listener_getopt.html | 24 +- man/v0.2.0/nng_listener_setopt.html | 24 +- man/v0.2.0/nng_listener_start.html | 24 +- man/v0.2.0/nng_msg_alloc.html | 24 +- man/v0.2.0/nng_msg_append.html | 24 +- man/v0.2.0/nng_msg_body.html | 24 +- man/v0.2.0/nng_msg_chop.html | 24 +- man/v0.2.0/nng_msg_clear.html | 24 +- man/v0.2.0/nng_msg_dup.html | 24 +- man/v0.2.0/nng_msg_free.html | 24 +- man/v0.2.0/nng_msg_header.html | 24 +- man/v0.2.0/nng_msg_header_append.html | 24 +- man/v0.2.0/nng_msg_header_chop.html | 24 +- man/v0.2.0/nng_msg_header_clear.html | 24 +- man/v0.2.0/nng_msg_header_insert.html | 24 +- man/v0.2.0/nng_msg_header_len.html | 24 +- man/v0.2.0/nng_msg_header_trim.html | 24 +- man/v0.2.0/nng_msg_insert.html | 24 +- man/v0.2.0/nng_msg_len.html | 24 +- man/v0.2.0/nng_msg_realloc.html | 24 +- man/v0.2.0/nng_msg_trim.html | 24 +- man/v0.2.0/nng_pair.html | 24 +- man/v0.2.0/nng_pub.html | 24 +- man/v0.2.0/nng_pull.html | 24 +- man/v0.2.0/nng_push.html | 24 +- man/v0.2.0/nng_recv.html | 654 +++++++++++++++++++++++++ man/v0.2.0/nng_rep.html | 26 +- man/v0.2.0/nng_req.html | 24 +- man/v0.2.0/nng_respondent.html | 24 +- man/v0.2.0/nng_send.html | 694 +++++++++++++++++++++++++++ man/v0.2.0/nng_strerror.html | 24 +- man/v0.2.0/nng_sub.html | 24 +- man/v0.2.0/nng_surveyor.html | 24 +- man/v0.2.0/nng_tcp.html | 24 +- man/v0.2.0/nng_tls.html | 24 +- man/v0.2.0/nng_tls_config_alloc.html | 24 +- man/v0.2.0/nng_tls_config_auth_mode.html | 24 +- man/v0.2.0/nng_tls_config_ca_chain.html | 24 +- man/v0.2.0/nng_tls_config_ca_file.html | 24 +- man/v0.2.0/nng_tls_config_cert_key_file.html | 24 +- man/v0.2.0/nng_tls_config_free.html | 24 +- man/v0.2.0/nng_tls_config_own_cert.html | 24 +- man/v0.2.0/nng_tls_config_server_name.html | 24 +- man/v0.2.0/nng_url_clone.html | 24 +- man/v0.2.0/nng_url_free.html | 24 +- man/v0.2.0/nng_url_parse.html | 24 +- man/v0.2.0/nng_ws.html | 24 +- man/v0.2.0/nng_zerotier.html | 24 +- 138 files changed, 1557 insertions(+), 3120 deletions(-) create mode 100644 man/v0.2.0/nng_recv.html create mode 100644 man/v0.2.0/nng_send.html diff --git a/man/v0.2.0/README.html b/man/v0.2.0/README.html index bd006bbb..8abec859 100644 --- a/man/v0.2.0/README.html +++ b/man/v0.2.0/README.html @@ -1,6 +1,6 @@ --- version: 0.2.0 -layout: default +layout: refman --- @@ -501,8 +501,13 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b .listingblock .pygments .tok-il { color: #666666 } /* Literal.Number.Integer.Long */ - +
@@ -518,11 +523,5 @@ for online viewing. asciidoctor supports PDF and EPUB formats via plugins, so there are still more options available.

- diff --git a/man/v0.2.0/libnng.html b/man/v0.2.0/libnng.html index 5b34eef7..36535c65 100644 --- a/man/v0.2.0/libnng.html +++ b/man/v0.2.0/libnng.html @@ -1,6 +1,6 @@ --- version: 0.2.0 -layout: default +layout: refman --- @@ -9,10 +9,6 @@ layout: default - libnng(3) + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+int nng_recv(nng_socket s, void *data, size_t *sizep int flags);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_recv() receives a message.

+
+
+

If the special flag NNG_FLAG_ALLOC is not specified, then the caller must +set data to a buffer to receive the message body content, and must store +the size of that buffer at the location pointed to by sizep. When the +function returns, if it is successful, the size at sizep will be updated with +the actual message body length copied into data.

+
+
+

If the special flag NNG_FLAG_ALLOC is present, then a "zero-copy" mode is +used. In this case the caller must set the value of data to the location +of another pointer (of type void *), and the sizep pointer must be set +to a location to receive the size of the message body. The function will then +allocate a message buffer (as if by nng_alloc(3)), fill it with +the message body, and store it at the address referenced by data, and update +the size referenced by sizep. When this flag is present, the caller assumes +responsibility for disposing of the received buffer either by the function +nng_free(3) or reusing the message for sending (with the same +size) via nng_send(3).

+
+
+ + + + + +
+ + +The semantics of what receiving a message means vary from protocol to +protocol, so examination of the protocol documentation is encouraged. (For +example, with an nng_req(3) socket a message may only be received +after a request has been sent, and an nng_sub(3) socket +may only receive messages corresponding to topics to which it has subscribed.) +Furthermore, some protocols may not support receiving data at all, such as +nng_pub(3). +
+
+
+ + + + + +
+ + +The NNG_FLAG_ALLOC flag can be used to reduce data copies, thereby +increasing performance, particularly if the buffer is reused to send +a response using the same flag. +
+
+
+
+
+

RETURN VALUES

+
+
+

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

+
+
+
+
+

ERRORS

+
+
+
+
NNG_EAGAIN
+
+

The socket s cannot accept data for sending.

+
+
NNG_ECLOSED
+
+

The socket s is not open.

+
+
NNG_EINVAL
+
+

An invalid set of flags was specified.

+
+
NNG_EMSGSIZE
+
+

The received message did not fit in the size provided.

+
+
NNG_ENOMEM
+
+

Insufficient memory is available.

+
+
NNG_ENOTSUP
+
+

The protocol for socket s does not support receiving.

+
+
NNG_ESTATE
+
+

The socket s cannot receive data in this state.

+
+
+
+
+
+ +
+ + diff --git a/man/v0.2.0/nng_rep.html b/man/v0.2.0/nng_rep.html index dba1ff90..09be9cca 100644 --- a/man/v0.2.0/nng_rep.html +++ b/man/v0.2.0/nng_rep.html @@ -1,6 +1,6 @@ --- version: 0.2.0 -layout: default +layout: refman --- @@ -9,10 +9,6 @@ layout: default - nng_rep(7) + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+int nng_send(nng_socket s, void *data, size_t size, int flags);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_send() sends a message containing the data of length size +using the socket s.

+
+
+ + + + + +
+ + +The semantics of what sending a message means vary from protocol to +protocol, so examination of the protocol documentation is encouraged. (For +example, with an nng_pub(3) socket the data is broadcast, so that +any peers who have a suitable subscription will be able to receive it using +nng_recv(3) or a similar function.) Furthermore, some protocols +may not support sending data (such as nng_sub(3)) or may +require other conditions. (For example, nng_rep(3) sockets +cannot normally send data, which are responses to requests, until they have +first received a request.) +
+
+
+

The flags may contain either of (or neither of) the following values:

+
+
+
+
NNG_FLAG_NONBLOCK
+
+

The function returns immediately, regardless of whether +the socket is able to accept the data or not. If the socket is unable +to accept the data (such as if backpressure exists because the peers +are consuming messages too slowly, or no peer is present), then the +function will return with NNG_EAGAIN. If this flag is not specified, +then the function will block if such a condition exists.

+
+
NNG_FLAG_ALLOC
+
+

The data was allocated using nng_alloc(3), or was obtained +from a call to nng_recv(3) with the NNG_FLAG_ALLOC flag. +If this function returns success, then the data is "owned" by the +function, and it will assume responsibility for calling +nng_free(3) when it is no longer needed. In the absence +of this flag, the data is copied by the implementation before the +function returns to the caller.

+
+
+
+
+ + + + + +
+ + +The NNG_FLAG_ALLOC flag can be used to reduce data copies, thereby +increasing performance. +
+
+
+ + + + + +
+ + +Regardless of the presence or absence of NNG_FLAG_NONBLOCK, there may +be queues between the sender and the receiver. Furthermore, there is no +guarantee that the message has actually been delivered. Finally, with some +protocols, the semantic is implictly NNG_FLAG_NONBLOCK, such as with +nng_pub(3) sockets, which are best-effort delivery only. +
+
+
+ + + + + +
+ + +When using NNG_FLAG_ALLOC, it is important that the value of size +match the actual allocated size of the data. Using an incorrect size results +in unspecified behavior, which may include heap corruption, program crashes, +or transdimensional mutation of the program’s author. +
+
+
+
+
+

RETURN VALUES

+
+
+

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

+
+
+
+
+

ERRORS

+
+
+
+
NNG_EAGAIN
+
+

The socket s cannot accept data for sending.

+
+
NNG_ECLOSED
+
+

The socket s is not open.

+
+
NNG_EINVAL
+
+

An invalid set of flags was specified.

+
+
NNG_EMSGSIZE
+
+

The value of size 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.

+
+
+
+
+
+ +
+ + diff --git a/man/v0.2.0/nng_strerror.html b/man/v0.2.0/nng_strerror.html index cf62554d..f0d57972 100644 --- a/man/v0.2.0/nng_strerror.html +++ b/man/v0.2.0/nng_strerror.html @@ -1,6 +1,6 @@ --- version: 0.2.0 -layout: default +layout: refman --- @@ -9,10 +9,6 @@ layout: default - nng_strerror(3)