From 548c184e2e319a41ec1342b147a79c6ffd7bf38c Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 8 Mar 2018 11:31:56 -0800 Subject: man page updates for 0.5.0 --- man/v0.5.0/libnng.html | 10 +- man/v0.5.0/nng_aio_cancel.html | 2 +- man/v0.5.0/nng_alloc.html | 598 +++++++++++++++++++++++ man/v0.5.0/nng_free.html | 601 ++++++++++++++++++++++++ man/v0.5.0/nng_http_conn_close.html | 2 +- man/v0.5.0/nng_http_conn_read.html | 4 +- man/v0.5.0/nng_http_conn_read_all.html | 3 +- man/v0.5.0/nng_http_conn_read_req.html | 3 +- man/v0.5.0/nng_http_conn_read_res.html | 3 +- man/v0.5.0/nng_http_conn_write.html | 4 +- man/v0.5.0/nng_http_conn_write_all.html | 3 +- man/v0.5.0/nng_http_conn_write_req.html | 7 +- man/v0.5.0/nng_http_conn_write_res.html | 7 +- man/v0.5.0/nng_http_handler_alloc.html | 2 +- man/v0.5.0/nng_http_hijack.html | 6 +- man/v0.5.0/nng_http_res_alloc.html | 2 +- man/v0.5.0/nng_msg_header_insert.html | 2 +- man/v0.5.0/nng_recvmsg.html | 643 +++++++++++++++++++++++++ man/v0.5.0/nng_sendmsg.html | 678 +++++++++++++++++++++++++++ man/v0.5.0/nng_tls_config_alloc.html | 1 + man/v0.5.0/nng_tls_config_auth_mode.html | 1 + man/v0.5.0/nng_tls_config_ca_chain.html | 1 + man/v0.5.0/nng_tls_config_ca_file.html | 1 + man/v0.5.0/nng_tls_config_cert_key_file.html | 1 + man/v0.5.0/nng_tls_config_free.html | 1 + man/v0.5.0/nng_tls_config_own_cert.html | 1 + man/v0.5.0/nng_tls_config_server_name.html | 1 + man/v0.5.0/nng_version.html | 600 ++++++++++++++++++++++++ man/v0.5.0/nng_zerotier.html | 57 ++- man/v0.5.0/nngcat.html | 89 ++-- 30 files changed, 3266 insertions(+), 68 deletions(-) create mode 100644 man/v0.5.0/nng_alloc.html create mode 100644 man/v0.5.0/nng_free.html create mode 100644 man/v0.5.0/nng_recvmsg.html create mode 100644 man/v0.5.0/nng_sendmsg.html create mode 100644 man/v0.5.0/nng_version.html diff --git a/man/v0.5.0/libnng.html b/man/v0.5.0/libnng.html index 1b956696..f685be30 100644 --- a/man/v0.5.0/libnng.html +++ b/man/v0.5.0/libnng.html @@ -572,6 +572,10 @@ intended to solve common communication problems in distributed applications.

nng_strerror(3)

return an error description

+ +

nng_version(3)

+

report library version

+ @@ -743,7 +747,7 @@ Most applications will only interact with the body.

remove data from start of message body

-

nng_recvmsg(3)

+

nng_recvmsg(3)

receive a message

@@ -810,7 +814,7 @@ mode may need to access the header of messages.

Asynchronous Operations

Most applications will interact with nng synchronously; that is that -functions such as nng_send() will block the calling +functions such as nng_send(3) will block the calling thread until the operation has completed.

@@ -1366,7 +1370,7 @@ with TLS support. -

nng_tls_config_alloc(3)

+

nng_tls_config_alloc(3)

allocate TLS configuration

diff --git a/man/v0.5.0/nng_aio_cancel.html b/man/v0.5.0/nng_aio_cancel.html index d7f49685..cf4af7c1 100644 --- a/man/v0.5.0/nng_aio_cancel.html +++ b/man/v0.5.0/nng_aio_cancel.html @@ -557,7 +557,7 @@ has no effect.

-This function is the same as calling nng_aio_abort() +This function is the same as calling nng_aio_abort(3) with the error NNG_ECANCELED. diff --git a/man/v0.5.0/nng_alloc.html b/man/v0.5.0/nng_alloc.html new file mode 100644 index 00000000..8f085081 --- /dev/null +++ b/man/v0.5.0/nng_alloc.html @@ -0,0 +1,598 @@ +--- +version: 0.5.0 +layout: refman +--- + + + + + + + +nng_alloc(3) + + + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+void *nng_alloc(size_t size);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_alloc() function allocates a contiguous memory region of +at least size bytes. The memory will be 64-bit aligned.

+
+
+

The returned memory can be used to hold message buffers, in which +case it can be directly passed to nng_send(3) using +the flag NNG_FLAG_ALLOC. Alternatively, it can be freed when no +longer needed using nng_free(3).

+
+
+ + + + + +
+ + +Do not use the system free() function to release this memory. +On some platforms this may work, but it is not guaranteed and may lead +to a crash or other undesirable and unpredictable behavior. +
+
+
+
+
+

RETURN VALUES

+
+
+

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

+
+
+
+
+

ERRORS

+
+
+
+
NNG_ENOMEM
+
+

Insufficient free memory exists.

+
+
+
+
+
+
+

SEE ALSO

+ +
+
+ + diff --git a/man/v0.5.0/nng_free.html b/man/v0.5.0/nng_free.html new file mode 100644 index 00000000..20a9af14 --- /dev/null +++ b/man/v0.5.0/nng_free.html @@ -0,0 +1,601 @@ +--- +version: 0.5.0 +layout: refman +--- + + + + + + + +nng_free(3) + + + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+void nng_free(void *ptr, size_t size);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_free() function deallocates a memory region of size size, +that was previously allocated by nng_alloc(3) or +nng_recv(3) with the NNG_FLAG_ALLOC flag.

+
+
+ + + + + +
+ + +It is very important that size match the allocation size +used to allocate the memory. +
+
+
+ + + + + +
+ + +Do not attempt to use this function to deallocate memory +obtained by a call to the system malloc() or calloc() functions, +or the C++ new operator. Doing so may result in unpredictable +behavior, including corruption of application memory. +
+
+
+
+
+

RETURN VALUES

+
+
+

None.

+
+
+
+
+

ERRORS

+
+
+

None.

+
+
+
+
+

SEE ALSO

+ +
+
+ + diff --git a/man/v0.5.0/nng_http_conn_close.html b/man/v0.5.0/nng_http_conn_close.html index 47b60631..39227d51 100644 --- a/man/v0.5.0/nng_http_conn_close.html +++ b/man/v0.5.0/nng_http_conn_close.html @@ -566,7 +566,7 @@ including any disposing of any underlying file descriptors or related resources.
diff --git a/man/v0.5.0/nng_http_conn_read.html b/man/v0.5.0/nng_http_conn_read.html index 4481f241..3eaeb366 100644 --- a/man/v0.5.0/nng_http_conn_read.html +++ b/man/v0.5.0/nng_http_conn_read.html @@ -557,7 +557,7 @@ called first, to set the scatter/gather vector for aio.

This function returns immediately, with no return value. Completion of the operation is signaled via the aio, and the final result may be -obtained via nng_aio_result. That result will +obtained via nng_aio_result(3). That result will either be zero or an error code.

@@ -635,7 +635,7 @@ to use this function. nng_aio_count(3), nng_aio_result(3), nng_aio_set_iov(3), -nng_http_alloc_handler(3), +nng_http_handler_alloc(3), nng_http_client_connect(3), nng_http_conn_read_all(3), nng_strerror(3), diff --git a/man/v0.5.0/nng_http_conn_read_all.html b/man/v0.5.0/nng_http_conn_read_all.html index fcae92a5..9e50f251 100644 --- a/man/v0.5.0/nng_http_conn_read_all.html +++ b/man/v0.5.0/nng_http_conn_read_all.html @@ -557,7 +557,7 @@ called first, to set the scatter/gather vector for aio.

This function returns immediately, with no return value. Completion of the operation is signaled via the aio, and the final result may be -obtained via nng_aio_result. That result will +obtained via nng_aio_result(3). That result will either be zero or an error code.

@@ -639,7 +639,6 @@ from the relevant HTTP headers (typically Content-Length). nng_aio_count(3), nng_aio_result(3), nng_aio_set_iov(3), -nng_http_alloc_handler(3), nng_http_client_connect(3), nng_http_conn_read(3), nng_strerror(3), diff --git a/man/v0.5.0/nng_http_conn_read_req.html b/man/v0.5.0/nng_http_conn_read_req.html index e75f6b43..86a836b9 100644 --- a/man/v0.5.0/nng_http_conn_read_req.html +++ b/man/v0.5.0/nng_http_conn_read_req.html @@ -560,7 +560,7 @@ data, based on the details of the request itself.

This function returns immediately, with no return value. Completion of the operation is signaled via the aio, and the final result may be -obtained via nng_aio_result. That result will +obtained via nng_aio_result(3). That result will either be zero or an error code.

@@ -612,7 +612,6 @@ either be zero or an error code.

nng_aio_alloc(3), nng_aio_result(3), -nng_http_alloc_handler(3), nng_http_client_connect(3), nng_http_conn_read_all(3), nng_strerror(3), diff --git a/man/v0.5.0/nng_http_conn_read_res.html b/man/v0.5.0/nng_http_conn_read_res.html index 4a8b05c8..745660b4 100644 --- a/man/v0.5.0/nng_http_conn_read_res.html +++ b/man/v0.5.0/nng_http_conn_read_res.html @@ -560,7 +560,7 @@ data, based on the details of the response itself.

This function returns immediately, with no return value. Completion of the operation is signaled via the aio, and the final result may be -obtained via nng_aio_result. That result will +obtained via nng_aio_result(3). That result will either be zero or an error code.

@@ -612,7 +612,6 @@ either be zero or an error code.

nng_aio_alloc(3), nng_aio_result(3), -nng_http_alloc_handler(3), nng_http_client_connect(3), nng_http_conn_read_all(3), nng_strerror(3), diff --git a/man/v0.5.0/nng_http_conn_write.html b/man/v0.5.0/nng_http_conn_write.html index 15e15e4a..a3ab7d29 100644 --- a/man/v0.5.0/nng_http_conn_write.html +++ b/man/v0.5.0/nng_http_conn_write.html @@ -557,7 +557,7 @@ called first, to set the scatter/gather vector for aio.

This function returns immediately, with no return value. Completion of the operation is signaled via the aio, and the final result may be -obtained via nng_aio_result. That result will +obtained via nng_aio_result(3). That result will either be zero or an error code.

diff --git a/man/v0.5.0/nng_http_conn_write_all.html b/man/v0.5.0/nng_http_conn_write_all.html index 1a7878c9..01de114c 100644 --- a/man/v0.5.0/nng_http_conn_write_all.html +++ b/man/v0.5.0/nng_http_conn_write_all.html @@ -557,7 +557,7 @@ called first, to set the scatter/gather vector for aio.

This function returns immediately, with no return value. Completion of the operation is signaled via the aio, and the final result may be -obtained via nng_aio_result. That result will +obtained via nng_aio_result(3). That result will either be zero or an error code.

@@ -671,7 +671,6 @@ the body data will be written automatically by the nng_aio_count(3), nng_aio_result(3), nng_aio_set_iov(3), -nng_http_alloc_handler(3), nng_http_client_connect(3), nng_http_conn_write(3), http_conn_write_req(3), diff --git a/man/v0.5.0/nng_http_conn_write_req.html b/man/v0.5.0/nng_http_conn_write_req.html index 102de302..c280c710 100644 --- a/man/v0.5.0/nng_http_conn_write_req.html +++ b/man/v0.5.0/nng_http_conn_write_req.html @@ -542,13 +542,13 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b the HTTP request req to the connection conn. The entire request is sent, including headers, and if present, the request body data. (The request body can be set with -nng_http_req_set_data or -nng_http_req_copy_data.)

+nng_http_req_set_data(3) or +nng_http_req_copy_data(3).)

This function returns immediately, with no return value. Completion of the operation is signaled via the aio, and the final result may be -obtained via nng_aio_result. That result will +obtained via nng_aio_result(3). That result will either be zero or an error code.

@@ -600,7 +600,6 @@ either be zero or an error code.

nng_aio_alloc(3), nng_aio_result(3), -nng_http_alloc_handler(3), nng_http_client_connect(3), nng_http_conn_read_all(3), nng_strerror(3), diff --git a/man/v0.5.0/nng_http_conn_write_res.html b/man/v0.5.0/nng_http_conn_write_res.html index 892a94bb..974f6503 100644 --- a/man/v0.5.0/nng_http_conn_write_res.html +++ b/man/v0.5.0/nng_http_conn_write_res.html @@ -546,13 +546,13 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b the HTTP response res to the connection conn. The entire response is sent, including headers, and if present, the response body data. (The response body can be set with -nng_http_res_set_data or -nng_http_res_copy_data.)

+nng_http_res_set_data(3) or +nng_http_res_copy_data(3).)

This function returns immediately, with no return value. Completion of the operation is signaled via the aio, and the final result may be -obtained via nng_aio_result. That result will +obtained via nng_aio_result(3). That result will either be zero or an error code.

@@ -616,7 +616,6 @@ then the connection is immediately after sending the response.

nng_aio_alloc(3), nng_aio_result(3), -nng_http_alloc_handler(3), nng_http_client_connect(3), nng_http_conn_read_all(3), nng_strerror(3), diff --git a/man/v0.5.0/nng_http_handler_alloc.html b/man/v0.5.0/nng_http_handler_alloc.html index f9f30047..5627f2ae 100644 --- a/man/v0.5.0/nng_http_handler_alloc.html +++ b/man/v0.5.0/nng_http_handler_alloc.html @@ -566,7 +566,7 @@ considered when determining whether the handler should be called.

Additionally each handler has a method it is registered to handle (the default is "GET", see -<<nng_http_handler_set_method#,nng_http_handler_set_method(3)), and +nng_http_handler_set_method(3)), and optionally a 'Host' header it can be matched against (see <<nng_http_handler_set_host#,nng_http_handler_set_host(3)).

diff --git a/man/v0.5.0/nng_http_hijack.html b/man/v0.5.0/nng_http_hijack.html index 54d16b8c..f4f8980e 100644 --- a/man/v0.5.0/nng_http_hijack.html +++ b/man/v0.5.0/nng_http_hijack.html @@ -547,7 +547,7 @@ some other purpose, and should not be used any further by the server.

This function is most useful when called from a handler function. -(See <<nng_http_alloc_handler#,nng_http_alloc_handler(3).)

+(See <<nng_http_handler_alloc#,nng_http_handler_alloc(3).)

@@ -614,8 +614,8 @@ to use this function.

SEE ALSO

diff --git a/man/v0.5.0/nng_http_res_alloc.html b/man/v0.5.0/nng_http_res_alloc.html index c4ce0545..0cbd1aa7 100644 --- a/man/v0.5.0/nng_http_res_alloc.html +++ b/man/v0.5.0/nng_http_res_alloc.html @@ -589,7 +589,7 @@ When an error response is needed, consider using

nng_http_conn_read_res(3), nng_http_conn_write_res(3), nng_http_req_alloc(3), -nng_http_res_alloc_error(3), +nng_http_res_alloc_error(3), nng_http_res_add_header(3), nng_http_res_copy_data(3), nng_http_res_del_header(3), diff --git a/man/v0.5.0/nng_msg_header_insert.html b/man/v0.5.0/nng_msg_header_insert.html index 87448ca9..7968a3fb 100644 --- a/man/v0.5.0/nng_msg_header_insert.html +++ b/man/v0.5.0/nng_msg_header_insert.html @@ -571,8 +571,8 @@ second function prepends the value val32 in network-byte order (big-end

nng_msg_alloc(3), +nng_msg_header(3), nng_msg_header_append(3), -nng_msg_header_body(3), nng_msg_header_chop(3), nng_msg_header_len(3), nng_msg_header_trim(3), diff --git a/man/v0.5.0/nng_recvmsg.html b/man/v0.5.0/nng_recvmsg.html new file mode 100644 index 00000000..40cf69ba --- /dev/null +++ b/man/v0.5.0/nng_recvmsg.html @@ -0,0 +1,643 @@ +--- +version: 0.5.0 +layout: refman +--- + + + + + + + +nng_recvmsg(3) + + + + + + +

+
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+int nng_recvmsg(nng_socket s, nng_msg **msgp, int flags);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_recvmsg() receives a message on socket s, storing the +received message at the location pointed to by msgp.

+
+
+
+ + + + +
+ + +Using this function gives access to the message structure, and thus may +offer more functionality than the simpler nng_recv(3) function. +
+
+
+

The flags may contain the following value:

+
+
+
+
NNG_FLAG_NONBLOCK
+
+

The function returns immediately, even if no message is available. Without +this flag, the function will wait until a message is received by the socket +s, or any configured timer expires.

+
+
+
+
+ + + + + +
+ + +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(7) socket a message may only be received +after a request has been sent, and an nng_sub(7) 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(7). +
+
+
+
+
+

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_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.5.0/nng_sendmsg.html b/man/v0.5.0/nng_sendmsg.html new file mode 100644 index 00000000..8d19c525 --- /dev/null +++ b/man/v0.5.0/nng_sendmsg.html @@ -0,0 +1,678 @@ +--- +version: 0.5.0 +layout: refman +--- + + + + + + + +nng_sendmsg(3) + + + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+int nng_sendmsg(nng_socket s, nng_msg *msg, int flags);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_sendmsg() sends message msg using the socket s.

+
+
+

If the function returns zero, indicating it has accepted the message for +delivery, then the msg is “owned” by the socket s, and the caller +must not make any further use of it. The socket will free the message +when it is finished.

+
+
+

If the function returns non-zero, then it is the caller’s responsibility +to dispose of the msg, which may include freeing it, sending it to +another socket, or simply trying again later.

+
+
+ + + + + +
+ + +Using this function gives access to the message structure, and may +offer more functionality than the simpler nng_send(3) function. +
+
+
+ + + + + +
+ + +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(7) 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 (such as nng_sub(7)) or may +require other conditions. (For example, nng_rep(7) sockets +cannot normally send data, which are responses to requests, until they have +first received a request.) +
+
+
+

The flags may contain the following value:

+
+
+
+
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.

+
+
+
+
+ + + + + +
+ + +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(7) sockets, which are best-effort delivery only. +
+
+
+
+
+

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.5.0/nng_tls_config_alloc.html b/man/v0.5.0/nng_tls_config_alloc.html index 204cb49b..87a646be 100644 --- a/man/v0.5.0/nng_tls_config_alloc.html +++ b/man/v0.5.0/nng_tls_config_alloc.html @@ -526,6 +526,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
#include <nng/nng.h>
+#include <nng/supplemental/tls/tls.h>
 
 typedef enum nng_tls_mode {
         NNG_TLS_MODE_CLIENT,
diff --git a/man/v0.5.0/nng_tls_config_auth_mode.html b/man/v0.5.0/nng_tls_config_auth_mode.html
index ddbbcbf5..77369ad0 100644
--- a/man/v0.5.0/nng_tls_config_auth_mode.html
+++ b/man/v0.5.0/nng_tls_config_auth_mode.html
@@ -526,6 +526,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 
#include <nng/nng.h>
+#include <nng/supplemental/tls/tls.h>
 
 typedef enum nng_tls_auth_mode {
         NNG_TLS_AUTH_MODE_NONE,
diff --git a/man/v0.5.0/nng_tls_config_ca_chain.html b/man/v0.5.0/nng_tls_config_ca_chain.html
index 033db401..5c7ab7d4 100644
--- a/man/v0.5.0/nng_tls_config_ca_chain.html
+++ b/man/v0.5.0/nng_tls_config_ca_chain.html
@@ -526,6 +526,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
 
#include <nng/nng.h>
+#include <nng/supplemental/tls/tls.h>
 
 int nng_tls_config_ca_cert(nni_tls_config *cfg, const char *chain,
     const char *crl);
diff --git a/man/v0.5.0/nng_tls_config_ca_file.html b/man/v0.5.0/nng_tls_config_ca_file.html index 616621cc..d188ee30 100644 --- a/man/v0.5.0/nng_tls_config_ca_file.html +++ b/man/v0.5.0/nng_tls_config_ca_file.html @@ -526,6 +526,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
#include <nng/nng.h>
+#include <nng/supplemental/tls/tls.h>
 
 int nng_tls_config_ca_file(nni_tls_config *cfg, const char *path);
diff --git a/man/v0.5.0/nng_tls_config_cert_key_file.html b/man/v0.5.0/nng_tls_config_cert_key_file.html index 3c085f7e..1d68556c 100644 --- a/man/v0.5.0/nng_tls_config_cert_key_file.html +++ b/man/v0.5.0/nng_tls_config_cert_key_file.html @@ -526,6 +526,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
#include <nng/nng.h>
+#include <nng/supplemental/tls/tls.h>
 
 int nng_tls_config_cert_key_file(nni_tls_config *cfg, const char *path,
     const char *pass);
diff --git a/man/v0.5.0/nng_tls_config_free.html b/man/v0.5.0/nng_tls_config_free.html index fe8de97b..e23300b7 100644 --- a/man/v0.5.0/nng_tls_config_free.html +++ b/man/v0.5.0/nng_tls_config_free.html @@ -526,6 +526,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
#include <nng/nng.h>
+#include <nng/supplemental/tls/tls.h>
 
 void nng_tls_config_free(nni_tls_config *cfg);
diff --git a/man/v0.5.0/nng_tls_config_own_cert.html b/man/v0.5.0/nng_tls_config_own_cert.html index 85432c99..d1f63586 100644 --- a/man/v0.5.0/nng_tls_config_own_cert.html +++ b/man/v0.5.0/nng_tls_config_own_cert.html @@ -526,6 +526,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
#include <nng/nng.h>
+#include <nng/supplemental/tls/tls.h>
 
 int nng_tls_config_own_cert(nni_tls_config *cfg, const char *cert,
     const char *key, const char *pass);
diff --git a/man/v0.5.0/nng_tls_config_server_name.html b/man/v0.5.0/nng_tls_config_server_name.html index f0a33686..611d82a1 100644 --- a/man/v0.5.0/nng_tls_config_server_name.html +++ b/man/v0.5.0/nng_tls_config_server_name.html @@ -526,6 +526,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
#include <nng/nng.h>
+#include <nng/supplemental/tls/tls.h>
 
 int nng_tls_config_server_name(nni_tls_config *cfg, const char *name);
diff --git a/man/v0.5.0/nng_version.html b/man/v0.5.0/nng_version.html new file mode 100644 index 00000000..876b8efd --- /dev/null +++ b/man/v0.5.0/nng_version.html @@ -0,0 +1,600 @@ +--- +version: 0.5.0 +layout: refman +--- + + + + + + + +nng_version(3) + + + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+const char * nng_version(void);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_version() function returns a human readable version +number for the nng library. This is intended for output in +programs, and so forth.

+
+
+

Additionally, compile time version information is available +via some predefined macros:

+
+
+
+
NNG_MAJOR_VERSION
+
+

Major version number.

+
+
NNG_MINOR_VERSION
+
+

Minor version number.

+
+
NNG_PATCH_VERSION
+
+

Patch version number.

+
+
+
+
+

The nng library is developed and released using +Semantic Versioning 2.0, and +the version numbers reported refer to both the API and the +library itself. (The ABI — binary interface — between the +library and the application is controlled in a similar, but different +manner depending upon the link options and how the library is built.)

+
+
+
+
+

RETURN VALUES

+
+
+

C string (NUL-terminated) containing the library version number.

+
+
+
+
+

ERRORS

+
+
+

None.

+
+
+
+
+

SEE ALSO

+
+ +
+
+
+ + diff --git a/man/v0.5.0/nng_zerotier.html b/man/v0.5.0/nng_zerotier.html index c49649f8..330c8d18 100644 --- a/man/v0.5.0/nng_zerotier.html +++ b/man/v0.5.0/nng_zerotier.html @@ -546,11 +546,11 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b nng applications over a ZeroTier network, using a Virtual Layer 2 packet facility.

-
+
- + This transport is very experimental. To utilize it at @@ -561,11 +561,11 @@ linking against a suitable libzerotiercore static library.
-
+
- + The libzerotiercore library at present is covered under different @@ -575,6 +575,22 @@ and adhere to the licensing terms.
+
+ + + + + +
+ + +The ZeroTier transport can take a long time to establish an +initial connection — up to even a minute in extreme cases, while the network +topology is configured. Consequently, this transport is not recommended +for use cases involving short-lived programs, but is better for long-running +programs such as background daemons or agents. +
+

While ZeroTier makes use of the host’s IP stack (and UDP in particular), this transport does not use or require an IP stack on the virtual @@ -651,6 +667,20 @@ members are, unlike TCP socket address, in native byte order. Only the lower 24-bits of the sa_port may be used. Likewise only the lower 40-bits of the sa_nodeid may be used.

+
+ + + + + +
+ + +The fields of this structure are in native byte order, +unlike the other socket address structures associated with NNG_AF_INET or +NNG_AF_INET6. +
+

Node Presence

@@ -716,8 +746,8 @@ provides a uint64_t in native byte order representing the ZeroTier Valid values for this are:

--++ @@ -752,13 +782,26 @@ Valid values for this are:

This is a read-only ASCIIZ string containing the name of the network as established by the ZeroTier network administrator.

+
NNG_OPT_ZT_CONN_TIME
+
+

The time to wait between sending connection attempts. This is an +nng_duration (msec), and is only used with dialers. The default is 500 msec.

+
+
NNG_OPT_ZT_CONN_TRIES
+
+

The maximum number (int) of attempts to try to establish a connection +before reporting a timeout, and is only used with dialers. The default +is 240, which results in a 2 minute timeout if NNG_OPT_ZT_CONN_TIME is at +it’s default of 500. If the value is set to 0, then the connection +attempts will keep retrying forever.

+
NNG_OPT_ZT_PING_TIME

If no traffic has been received from the ZeroTier peer after this period of time, then a "ping" message is sent to check if the peer is still alive. This is an nng_duration (msec).

-
NNG_OPT_ZT_PING_COUNT
+
NNG_OPT_ZT_PING_TRIES

If this number (int) of consecutive "ping" requests are sent to the peer with no response (and no other intervening traffic), then the diff --git a/man/v0.5.0/nngcat.html b/man/v0.5.0/nngcat.html index 74026a9c..6731ce0b 100644 --- a/man/v0.5.0/nngcat.html +++ b/man/v0.5.0/nngcat.html @@ -517,6 +517,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

  • Receive Options
  • Transmit Options
  • TLS Options
  • +
  • ZeroTier Options
  • EXAMPLES
  • @@ -536,6 +537,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

    nngcat --help

    +

    nngcat --version

    +
    +

    nngcat [OPTION]…​

    @@ -584,6 +588,10 @@ equa

    Get usage help.

    +
    -V, --version
    +
    +

    Print the version and exit.

    +
    -v, --verbose

    Select verbose operation.

    @@ -596,13 +604,14 @@ equa

    Compatible mode. This cause nngcat to behave more like the legacy nanocat application. In this mode connections are made asynchronously, -and the --pair option selects version 0 of the PAIR protocol -instead of version 1.

    +and the --pair option selects version 0 of the nng_pair(7) +protocol instead of version 1.

    --subscribe=TOPIC

    Subscribe to TOPIC. This option can only be used with the -SUBv0 protocol. The TOPIC is checked against the first bytes +nng_sub(7) protocol. The TOPIC is checked against the +first bytes of messages received, and messages are discarded if they do not match. This may be specified multiple times to subscribe to multiple topics. If not specified at all, then a default subscription to everything is assumed.

    @@ -628,50 +637,53 @@ At least one protocol must be selected.
    --bus, --bus0
    -

    Select the BUSv0 protocol. This protocol can send -and receive messages to and from other BUSv0 peers.

    +

    Select the nng_bus(7) version 0 protocol. This protocol can send +and receive messages to and from other BUS version 0 peers.

    --req, --req0
    -

    Select the REQv0 protocol. This protocol sends -messages to REPv0 peers and receives replies from them.

    +

    Select the nng_req(7) version 0 protocol. This protocol sends +messages to nng_rep(7) version 0 peers and receives replies +from them.

    --rep, --rep0
    -

    Select the REPv0 protocol. This protocol receives -messages from REQv0 peers and can send replies to them.

    +

    Select the nng_rep(7) version 0 protocol. This protocol +receives messages from nng_req(7) version 0 peers and can send +replies to them.

    --pub, --pub0
    -

    Select the PUBv0 protocol. This protocol sends -messages to SUBv0 peers.

    +

    Select the nng_pub(7) version 0 protocol. This protocol sends +messages to nng_sub(7) version peers.

    --sub, --sub0
    -

    Select the SUBv0 protocol. This protocol receives -messages from PUBv0 peers, and filters them based on -subscriptions set with --subscribe.

    +

    Select the nng_sub(7) version 0 protocol. +This protocol receives messages from nng_pub(7) version 0 peers, +and filters them based on subscriptions set with --subscribe.

    --push, --push0
    -

    Select the PUSHv0 protocol. This protocol sends -messages to PULLv0 peers. A given message is normally -only delivered to a single peer.

    +

    Select the nng_push(7) version 0 protocol. +This protocol sends messages to nng_pull(7) version 0 peers. +A given message is normally only delivered to a single peer.

    --pull, --pull0
    -

    Select the PULLv0 protocol. This protocol receives -messages from PUSHv0 peers.

    +

    Select the nng_pull(7) version 0 protocol. +This protocol receives +messages from nng_push(7) version 0 peers.

    --pair0
    -

    Select the PAIRv0 protocol. This protocol can send and -receive messages with one connected PAIRv0 peer.

    +

    Select the nng_pair(7) veresion 0 protocol. This protocol +can send and receive messages with one connected PAIR version 0 peer.

    --pair1
    -

    Select the PAIRv1 protocol. This protocol can send and -receive messages with one connected PAIRv1 peer. It +

    Select the nng_pair(7) version 1 protocol. This protocol +can send and receive messages with one connected PAIR version 1 peer. It is not supported in --compat mode. (Polyamorous mode is not supported in nngcat, although peers may be using polyamorous mode.)

    @@ -682,15 +694,15 @@ which case it acts as an alias for --pair0.

    --surveyor, --surveyor0
    -

    Select the SURVEYORv0 protocol. This protocol sends -a survey request to RESPONDENTv0 peers, and then -receives replies from them.

    +

    Select the nng_surveyor(7) version 0 protocol. +This protocol sends a survey request to nng_respondent(7) +version 0 peers, and then receives replies from them.

    --respondent, --respondent0
    -

    Select the RESPONDENTv0 protocol. This protocol receives -survey requests from SURVEYORv0 peers, and can send a reply -to them.

    +

    Select the nng_respondent(7) version 0 protocol. +This protocol receives survey requests from nng_surveyor(7) +version 0 peers, and can send a reply to them.

    @@ -891,6 +903,23 @@ used as trust roots when validating certificates presented by peers.

    +
    +

    ZeroTier Options

    +
    +

    These options are only present if ZeroTier is configured; they are ignored +otherwise.

    +
    +
    +
    +
    --zt-home=DIRECTORY
    +
    +

    Directory for persistent ZeroTier node (key material, etc.) This directory +must already exist. Only one program may use a ZeroTier node at a time; +file locking is used to prevent this.

    +
    +
    +
    +
    @@ -922,7 +951,7 @@ $ nngcat --sub --dial=${<

    libnng(3), -nng(3), +nng(7), nng_bus(7), nng_pair(7), nng_pub(7), -- cgit v1.2.3-70-g09d2