From 5ed5dbf71b03d883e360d8d20faa81a35742e400 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 30 Sep 2018 09:38:48 -0700 Subject: man page updates for tip --- man/tip/index.html | 62 ++- man/tip/libnng.3.html | 72 +++ man/tip/nng_aio_alloc.3.html | 2 +- man/tip/nng_device.3.html | 2 +- man/tip/nng_dial.3.html | 4 +- man/tip/nng_dialer_setopt.3.html | 2 +- man/tip/nng_http_handler_alloc.3http.html | 1 + man/tip/nng_http_handler_collect_body.3http.html | 649 ++++++++++++++++++++++ man/tip/nng_http_req_alloc.3http.html | 15 + man/tip/nng_http_req_free.3http.html | 14 + man/tip/nng_http_req_reset.3http.html | 587 ++++++++++++++++++++ man/tip/nng_http_res_alloc.3http.html | 5 +- man/tip/nng_http_res_free.3http.html | 16 +- man/tip/nng_http_res_reset.3http.html | 573 ++++++++++++++++++++ man/tip/nng_listen.3.html | 2 +- man/tip/nng_listener_setopt.3.html | 2 +- man/tip/nng_listener_start.3.html | 4 +- man/tip/nng_msg.5.html | 27 - man/tip/nng_msg_append.3.html | 16 +- man/tip/nng_msg_chop.3.html | 14 +- man/tip/nng_msg_header_append.3.html | 20 +- man/tip/nng_msg_header_chop.3.html | 14 +- man/tip/nng_msg_header_insert.3.html | 18 +- man/tip/nng_msg_header_trim.3.html | 12 +- man/tip/nng_msg_insert.3.html | 17 +- man/tip/nng_msg_trim.3.html | 14 +- man/tip/nng_options.5.html | 2 +- man/tip/nng_opts_parse.3supp.html | 2 +- man/tip/nng_sockaddr.5.html | 2 +- man/tip/nng_stat.5.html | 622 +++++++++++++++++++++ man/tip/nng_stat_child.3.html | 590 ++++++++++++++++++++ man/tip/nng_stat_desc.3.html | 601 ++++++++++++++++++++ man/tip/nng_stat_name.3.html | 586 ++++++++++++++++++++ man/tip/nng_stat_next.3.html | 577 ++++++++++++++++++++ man/tip/nng_stat_string.3.html | 581 ++++++++++++++++++++ man/tip/nng_stat_timestamp.3.html | 610 +++++++++++++++++++++ man/tip/nng_stat_type.3.html | 645 ++++++++++++++++++++++ man/tip/nng_stat_unit.3.html | 636 ++++++++++++++++++++++ man/tip/nng_stat_value.3.html | 580 ++++++++++++++++++++ man/tip/nng_stats_free.3.html | 590 ++++++++++++++++++++ man/tip/nng_stats_get.3.html | 663 +++++++++++++++++++++++ man/tip/nng_tls_config_cert_key_file.3tls.html | 2 +- man/tip/nng_zerotier.7.html | 4 +- 43 files changed, 9356 insertions(+), 101 deletions(-) create mode 100644 man/tip/nng_http_handler_collect_body.3http.html create mode 100644 man/tip/nng_http_req_reset.3http.html create mode 100644 man/tip/nng_http_res_reset.3http.html create mode 100644 man/tip/nng_stat.5.html create mode 100644 man/tip/nng_stat_child.3.html create mode 100644 man/tip/nng_stat_desc.3.html create mode 100644 man/tip/nng_stat_name.3.html create mode 100644 man/tip/nng_stat_next.3.html create mode 100644 man/tip/nng_stat_string.3.html create mode 100644 man/tip/nng_stat_timestamp.3.html create mode 100644 man/tip/nng_stat_type.3.html create mode 100644 man/tip/nng_stat_unit.3.html create mode 100644 man/tip/nng_stat_value.3.html create mode 100644 man/tip/nng_stats_free.3.html create mode 100644 man/tip/nng_stats_get.3.html diff --git a/man/tip/index.html b/man/tip/index.html index ba8e2d5d..8bcecb15 100644 --- a/man/tip/index.html +++ b/man/tip/index.html @@ -616,7 +616,7 @@ primary API for building such applications.

nng_device(3)

-

send message

+

message forwarding device

nng_dial(3)

@@ -863,6 +863,50 @@ primary API for building such applications.

return numeric socket identifier

+

nng_stat_child(3)

+

get child statistic

+ + +

nng_stat_desc(3)

+

get statistic description

+ + +

nng_stat_name(3)

+

get statistic name

+ + +

nng_stat_next(3)

+

get next statistic

+ + +

nng_stat_string(3)

+

get statistic string value

+ + +

nng_stat_timestamp(3)

+

get statistic timestamp

+ + +

nng_stat_type(3)

+

get statistic value

+ + +

nng_stat_unit(3)

+

get statistic value

+ + +

nng_stat_value(3)

+

get statistic value

+ + +

nng_stats_free(3)

+

free statistics snapshot

+ + +

nng_stats_get(3)

+

get statistics snapshot

+ +

nng_strdup(3)

duplicate string

@@ -1142,6 +1186,10 @@ Protocols sockets.

allocate HTTP server handler

+

nng_http_handler_collect_body(3http)

+

set HTTP handler to collect request body

+ +

nng_http_handler_free(3http)

free HTTP server handler

@@ -1210,6 +1258,10 @@ Protocols sockets.

return HTTP request protocol version

+

nng_http_req_reset(3http)

+

reset HTTP request structure

+ +

nng_http_req_set_data(3http)

set HTTP request body

@@ -1274,6 +1326,10 @@ Protocols sockets.

return HTTP response protocol version

+

nng_http_res_reset(3http)

+

reset HTTP response structure

+ +

nng_http_res_set_data(3http)

set HTTP response body

@@ -1570,6 +1626,10 @@ applications need will use.

nng_socket(5)

socket handle

+ +

nng_stat(5)

+

statistic

+ diff --git a/man/tip/libnng.3.html b/man/tip/libnng.3.html index f9a6c45c..e4745295 100644 --- a/man/tip/libnng.3.html +++ b/man/tip/libnng.3.html @@ -518,6 +518,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
  • Protocols
  • Transports
  • Protocol Contexts
  • +
  • Statistics
  • URL Object
  • Supplemental API
  • HTTP Support
  • @@ -1145,6 +1146,65 @@ concurrent applications.

    +

    Statistics

    +
    +

    The following functions provide access to statistics which can be used +to observe program behaviors and as an aid in troubleshooting.

    +
    + ++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    nng_stat_child()

    get child statistic

    nng_stat_name()

    get statistic description

    nng_stat_name()

    get statistic name

    nng_stat_next()

    get next statistic

    nng_stat_string()

    get statistic string value

    nng_stat_timestamp()

    get statistic timestamp

    nng_stat_type()

    get statistic type

    nng_stat_unit()

    get statistic unit

    nng_stat_valueg()

    get statistic value

    nng_stats_free()

    free statistics

    nng_stats_get()

    get statistics

    +
    +

    URL Object

    Common functionality is supplied for parsing and handling @@ -1348,6 +1408,10 @@ and connections.

    return HTTP request protocol version

    +

    nng_http_req_reset()

    +

    reset HTTP request structure

    + +

    nng_http_req_set_data()

    set HTTP request body

    @@ -1412,6 +1476,10 @@ and connections.

    return HTTP response protocol version

    +

    nng_http_res_reset()

    +

    reset HTTP response structure

    + +

    nng_http_res_set_data()

    set HTTP response body

    @@ -1492,6 +1560,10 @@ and connections.

    allocate HTTP server handler

    +

    nng_http_handler_collect_body()

    +

    set HTTP handler to collect request body

    + +

    nng_http_handler_free()

    free HTTP server handler

    diff --git a/man/tip/nng_aio_alloc.3.html b/man/tip/nng_aio_alloc.3.html index 939dcab5..07fde231 100644 --- a/man/tip/nng_aio_alloc.3.html +++ b/man/tip/nng_aio_alloc.3.html @@ -550,7 +550,7 @@ It will be called with the argument arg.

    The callback callb must not perform any blocking operations, and -must complete it’s execution quickly. If callb does block, this can +must complete its execution quickly. If callb does block, this can lead ultimately to an apparent "hang" or deadlock in the application. diff --git a/man/tip/nng_device.3.html b/man/tip/nng_device.3.html index 93997e8f..3a3ba473 100644 --- a/man/tip/nng_device.3.html +++ b/man/tip/nng_device.3.html @@ -522,7 +522,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

    NAME

    -

    nng_sendmsg - send message

    +

    nng_device - message forwarding device

    diff --git a/man/tip/nng_dial.3.html b/man/tip/nng_dial.3.html index b0a09546..14c6d876 100644 --- a/man/tip/nng_dial.3.html +++ b/man/tip/nng_dial.3.html @@ -536,7 +536,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

    DESCRIPTION

    -

    The nng_dialer() function creates a newly initialized +

    The nng_dial() function creates a newly initialized nng_dialer object, associated with socket s, and configured to listen at the address specified by url, and starts it. @@ -654,7 +654,7 @@ using nng_dialer_create() an NNG_EINVAL -

    An invalid set of flags was specified.

    +

    An invalid set of flags or an invalid url was specified.

    diff --git a/man/tip/nng_dialer_setopt.3.html b/man/tip/nng_dialer_setopt.3.html index bb09f650..a0b8731e 100644 --- a/man/tip/nng_dialer_setopt.3.html +++ b/man/tip/nng_dialer_setopt.3.html @@ -573,7 +573,7 @@ transports themselves.

    Once a dialer has started, it is generally not possible to change -it’s configuration. +its configuration. diff --git a/man/tip/nng_http_handler_alloc.3http.html b/man/tip/nng_http_handler_alloc.3http.html index bac2c023..c2965f8c 100644 --- a/man/tip/nng_http_handler_alloc.3http.html +++ b/man/tip/nng_http_handler_alloc.3http.html @@ -742,6 +742,7 @@ sent the data, with Content-Length of size bytes, nng_aio_finish(3), nng_aio_get_input(3), nng_aio_set_output(3), +nng_http_handler_collect_body(3http), nng_http_handler_free(3http), nng_http_handler_set_host(3http), nng_http_handler_set_method(3http), diff --git a/man/tip/nng_http_handler_collect_body.3http.html b/man/tip/nng_http_handler_collect_body.3http.html new file mode 100644 index 00000000..dea2ce32 --- /dev/null +++ b/man/tip/nng_http_handler_collect_body.3http.html @@ -0,0 +1,649 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_http_handler_collect_body(3http) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/http/http.h>
    +
    +int nng_http_handler_collect_body(nng_http_handler *handler, bool want, size_t maxsz);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_http_handler_collect_data() function causes the handler to +collect any request body that was submitted with the request, and attach +it to the nng_http_req before the handler is called.

    +
    +
    +

    Subsequently the data can be retrieved by the handler from the request with the +nng_http_req_get_data() function.

    +
    +
    +

    The collection is enabled if want is true. +Furthermore, the data that the client may sent is limited by the +value of maxsz. +If the client attempts to send more data than maxsz, then the +request will be terminated with a 400 “Bad Request” status.

    +
    +
    + + + + + +
    + + +Limiting the size of incoming request data can provide protection +against denial of service attacks, as a buffer of the client-supplied +size must be allocated to receive the data. +
    +
    +
    +

    In order to provide an unlimited size, use (size_t)-1 for maxsz. +The value 0 for maxsz can be used to prevent any data from being passed +by the client.

    +
    +
    +

    The built-in handlers for files, directories, and static data limit the +maxsz to zero by default. +Otherwise the default setting is to enable this capability with a default +value of maxsz of 1 megabyte.

    +
    +
    + + + + + +
    + + +The handler looks for data indicated by the Content-Length: HTTP +header. +If this header is absent, the request is assumed not to contain any data. +
    +
    +
    + + + + + +
    + + +This specifically does not support the Chunked transfer-encoding. +This is considered a bug, and is a deficiency for full HTTP/1.1 compliance. +However, few clients send data in this format, so in practice this should +not create few limitations. +
    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

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

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    + + + + + +
    +NNG_ENOTSUP + +

    No support for HTTP in the library.

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_http_req_alloc.3http.html b/man/tip/nng_http_req_alloc.3http.html index dd402519..f12a1289 100644 --- a/man/tip/nng_http_req_alloc.3http.html +++ b/man/tip/nng_http_req_alloc.3http.html @@ -542,6 +542,20 @@ and stores a pointer to it in reqp. The request will be initialized to perform an HTTP/1.1 GET operation using the URL specified in url.

    +
    + + + + + +
    + + +It is possible to specify NULL for the URL. +In this case the URI for the request must be specified by a subsequent call +to nng_http_req_set_uri(). +
    +
    @@ -591,6 +605,7 @@ to perform an HTTP/1.1 GET operation using the URL specified in nng_http_req_get_method(3http), nng_http_req_get_uri(3http), nng_http_req_get_version(3http), +nng_http_req_reset(3http), nng_http_req_set_data(3http), nng_http_req_set_method(3http), nng_http_req_set_uri(3http), diff --git a/man/tip/nng_http_req_free.3http.html b/man/tip/nng_http_req_free.3http.html index f37ac9e3..d1907f2c 100644 --- a/man/tip/nng_http_req_free.3http.html +++ b/man/tip/nng_http_req_free.3http.html @@ -540,6 +540,19 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

    The nng_http_req_free() function deallocates the HTTP request structure req entirely.

    +
    + + + + + +
    + + +Instead of freeing and reallocating request structures, it is possible +to reuse req with nng_http_req_reset(). +
    +
    @@ -563,6 +576,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b diff --git a/man/tip/nng_http_req_reset.3http.html b/man/tip/nng_http_req_reset.3http.html new file mode 100644 index 00000000..466bbadd --- /dev/null +++ b/man/tip/nng_http_req_reset.3http.html @@ -0,0 +1,587 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_http_req_reset(3http) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/http/http.h>
    +
    +void nng_http_req_reset(nng_http_req *req);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_http_req_reset() function resets the request req so that it +is just as if it had been freshly allocated with +nng_http_req_alloc() with a NULL URL.

    +
    +
    + + + + + +
    + + +Before using this with an HTTP operation, the URI must be set using +nng_http_req_set_uri(). +
    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    None.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    +

    None.

    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_http_res_alloc.3http.html b/man/tip/nng_http_res_alloc.3http.html index 5a77269c..c9ad2f8b 100644 --- a/man/tip/nng_http_res_alloc.3http.html +++ b/man/tip/nng_http_res_alloc.3http.html @@ -540,8 +540,8 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

    The nng_http_res_alloc() function allocates a new HTTP response structure and stores a pointer to it in resp. The response will be initialized -with status code 200 (NNG_HTTP_STATUS_OK), and a reason phrase of "OK", -and HTTP protocol version "HTTP/1.1".

    +with status code 200 (NNG_HTTP_STATUS_OK), and a reason phrase of `"OK`", +and HTTP protocol version `"HTTP/1.1`".

    @@ -607,6 +607,7 @@ When an error response is needed, consider using nng_http_res_get_reason(3http), nng_http_res_get_status(3http), nng_http_res_get_version(3http), +nng_http_res_reset(3http), nng_http_res_set_data(3http), nng_http_res_set_reason(3http), nng_http_res_set_status(3http), diff --git a/man/tip/nng_http_res_free.3http.html b/man/tip/nng_http_res_free.3http.html index 908fbf7e..5d3e1686 100644 --- a/man/tip/nng_http_res_free.3http.html +++ b/man/tip/nng_http_res_free.3http.html @@ -540,6 +540,19 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

    The nng_http_res_free() function deallocates the HTTP response structure res entirely.

    +
    +
    + + + + +
    + + +Instead of freeing and reallocating response structures, it is possible +to reuse res with nng_http_res_reset(). +
    +
    @@ -562,7 +575,8 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

    SEE ALSO

    diff --git a/man/tip/nng_http_res_reset.3http.html b/man/tip/nng_http_res_reset.3http.html new file mode 100644 index 00000000..79453065 --- /dev/null +++ b/man/tip/nng_http_res_reset.3http.html @@ -0,0 +1,573 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_http_res_reset(3http) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/http/http.h>
    +
    +void nng_http_res_reset(nng_http_res *res);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_http_res_reset() function resets the response res so that it +is just as if it had been freshly allocated with +nng_http_res_alloc().

    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    None.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    +

    None.

    +
    +
    +
    +
    +

    SEE ALSO

    + +
    +
    + + diff --git a/man/tip/nng_listen.3.html b/man/tip/nng_listen.3.html index b377b2f8..2424b208 100644 --- a/man/tip/nng_listen.3.html +++ b/man/tip/nng_listen.3.html @@ -642,7 +642,7 @@ their pipes with the socket, until either it or the socket s is closed. NNG_EINVAL -

    An invalid set of flags was specified.

    +

    An invalid set of flags or an invalid url was specified.

    diff --git a/man/tip/nng_listener_setopt.3.html b/man/tip/nng_listener_setopt.3.html index 8ad13282..9390c1ed 100644 --- a/man/tip/nng_listener_setopt.3.html +++ b/man/tip/nng_listener_setopt.3.html @@ -571,7 +571,7 @@ are documented with the transports and protocols themselves.

    Once a listener has started, it is generally not possible to change -it’s configuration. +its configuration. diff --git a/man/tip/nng_listener_start.3.html b/man/tip/nng_listener_start.3.html index 37d8b8d5..4178d73e 100644 --- a/man/tip/nng_listener_start.3.html +++ b/man/tip/nng_listener_start.3.html @@ -546,7 +546,7 @@ Each new connection results in an nng_pipe
    -

    Normally, the act of “binding” to it’s address is done +

    Normally, the act of “binding” to its address is done synchronously, including any necessary name resolution. As a result, a failure, such as if the address is already in use, will be returned @@ -570,7 +570,7 @@ it also generally makes diagnosing failures somewhat more difficult.

    Once a listener has started, it is generally not possible to change -it’s configuration.

    +its configuration.

    diff --git a/man/tip/nng_msg.5.html b/man/tip/nng_msg.5.html index 067d743d..b0e88e89 100644 --- a/man/tip/nng_msg.5.html +++ b/man/tip/nng_msg.5.html @@ -509,8 +509,6 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b @@ -571,31 +569,6 @@ by making use of scratch areas at the beginning and end of the message.

    -

    RETURN VALUES

    -
    -
    -

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

    -
    -
    -
    -
    -

    ERRORS

    -
    -
    - - - - - -
    -NNG_ENOMEM - -

    Insufficient free memory exists to allocate a message.

    -
    -
    -
    -
    -

    SEE ALSO

    diff --git a/man/tip/nng_msg_append.3.html b/man/tip/nng_msg_append.3.html index cdd5e9f9..04923126 100644 --- a/man/tip/nng_msg_append.3.html +++ b/man/tip/nng_msg_append.3.html @@ -516,7 +516,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

    NAME

    -

    nng_msg_append, nng_msg_append_u32 - append to message body

    +

    nng_msg_append - append to message body

    @@ -528,8 +528,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    #include <nng/nng.h>
     
     int nng_msg_append(nng_msg *msg, const void *val, size_t size);
    -
    -int nng_msg_append_u32(nng_msg *msg, uint32_t val32);
    +int nng_msg_append_u16(nng_msg *msg, uint16_t val16); +int nng_msg_append_u32(nng_msg *msg, uint32_t val32); +int nng_msg_append_u64(nng_msg *msg, uint64_t val64);
    @@ -538,10 +539,11 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

    DESCRIPTION

    -

    The nng_msg_append() and nng_msg_append_u32() functions append data to +

    The nng_msg_append() family of functions appends data to the end of the body of message msg, reallocating it if necessary. -The first function appends size bytes, copying them from val. The -second function appends the value val32 in network-byte order (big-endian).

    +The first function appends size bytes, copying them from val. +The remaining functions append the value specified (such as val32) in +network-byte order (big-endian).

    @@ -549,7 +551,7 @@ second function appends the value val32 in network-byte order (big-endi

    RETURN VALUES

    -

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

    +

    These functions return 0 on success, and non-zero otherwise.

    diff --git a/man/tip/nng_msg_chop.3.html b/man/tip/nng_msg_chop.3.html index 43f31430..36d8af79 100644 --- a/man/tip/nng_msg_chop.3.html +++ b/man/tip/nng_msg_chop.3.html @@ -516,7 +516,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

    NAME

    -

    nng_msg_chop, nng_msg_chop_u32 - remove data from end of message body

    +

    nng_msg_chop - remove data from end of message body

    @@ -528,8 +528,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    #include <nng/nng.h>
     
     int nng_msg_chop(nng_msg *msg, size_t size);
    -
    -int nng_msg_chop_u32(nng_msg *msg, uint32_t *val32);
    +int nng_msg_chop_u16(nng_msg *msg, uint16_t *val16); +int nng_msg_chop_u32(nng_msg *msg, uint32_t *val32); +int nng_msg_chop_u64(nng_msg *msg, uint64_t *val64);
    @@ -538,10 +539,11 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

    DESCRIPTION

    -

    The nng_msg_chop() and nng_msg_chop_u32() functions remove data from +

    The nng_msg_chop() family of functions removes data from the end of the body of message msg. The first function removes size bytes. -The second function removes 4 bytes, and stores them in the value val32, +The remaining functions remove 2, 4, or 8 bytes, and stores them in the value +(such as val32), after converting them from network-byte order (big-endian) to native byte order.

    @@ -550,7 +552,7 @@ after converting them from network-byte order (big-endian) to native byte order.

    RETURN VALUES

    -

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

    +

    These functions return 0 on success, and non-zero otherwise.

    diff --git a/man/tip/nng_msg_header_append.3.html b/man/tip/nng_msg_header_append.3.html index e46ce42e..5b65391f 100644 --- a/man/tip/nng_msg_header_append.3.html +++ b/man/tip/nng_msg_header_append.3.html @@ -516,7 +516,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

    NAME

    -

    nng_msg_header_append, nng_msg_header_append_u32 - append to message header

    +

    nng_msg_header_append - append to message header

    @@ -528,8 +528,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    #include <nng/nng.h>
     
     int nng_msg_header_append(nng_msg *msg, const void *val, size_t size);
    -
    -int nng_msg_header_append_u32(nng_msg *msg, uint32_t val32);
    +int nng_msg_header_append_u16(nng_msg *msg, uint16_t val16); +int nng_msg_header_append_u32(nng_msg *msg, uint32_t val32); +int nng_msg_header_append_u64(nng_msg *msg, uint64_t val64);
    @@ -538,12 +539,13 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

    DESCRIPTION

    -

    The nng_msg_header_append() and nng_msg_header_append_u32() -functions append data to +

    The nng_msg_header_append() family of functions appends data to the end of the headers of message msg, reallocating it if necessary. -The first function appends size bytes, copying them from val. -The second function appends the value val32 in network-byte order -(big-endian).

    +The first function appends size bytes, copying them from val.

    +
    +
    +

    The remaining functions append the value (such as val32) in +network-byte order (big-endian).

    @@ -551,7 +553,7 @@ The second function appends the value val32 in network-byte order

    RETURN VALUES

    -

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

    +

    These functions return 0 on success, and non-zero otherwise.

    diff --git a/man/tip/nng_msg_header_chop.3.html b/man/tip/nng_msg_header_chop.3.html index 0e8df6aa..e5c94449 100644 --- a/man/tip/nng_msg_header_chop.3.html +++ b/man/tip/nng_msg_header_chop.3.html @@ -516,7 +516,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

    NAME

    -

    nng_msg_header_chop, nng_msg_header_chop_u32 - remove data from end of message header

    +

    nng_msg_header_chop - remove data from end of message header

    @@ -528,8 +528,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    #include <nng/nng.h>
     
     int nng_msg_header_chop(nng_msg *msg, size_t size);
    -
    -int nng_msg_header_chop_u32(nng_msg *msg, uint32_t *val32);
    +int nng_msg_header_chop_u16(nng_msg *msg, uint16_t *val16); +int nng_msg_header_chop_u32(nng_msg *msg, uint32_t *val32); +int nng_msg_header_chop_u64(nng_msg *msg, uint64_t *val64);
    @@ -538,10 +539,11 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

    DESCRIPTION

    -

    The nng_msg_header_chop() and nng_msg_header_chop_u32() functions remove +

    The nng_msg_header_chop() family of functions removes data from the end of the header of message msg. The first function removes size bytes. -The second function removes 4 bytes, and stores them in the value val32, +The remaining functions remove 2, 4, or 8 bytes, and stores them in the value +(such as val32), after converting them from network-byte order (big-endian) to native byte order.

    @@ -551,7 +553,7 @@ byte order.

    RETURN VALUES

    -

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

    +

    These function return 0 on success, and non-zero otherwise.

    diff --git a/man/tip/nng_msg_header_insert.3.html b/man/tip/nng_msg_header_insert.3.html index 41348dcc..fb6e3477 100644 --- a/man/tip/nng_msg_header_insert.3.html +++ b/man/tip/nng_msg_header_insert.3.html @@ -516,7 +516,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

    NAME

    -

    nng_msg_header_insert, nng_msg_header_insert_u32 - prepend to message header

    +

    nng_msg_header_insert - prepend to message header

    @@ -528,8 +528,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    #include <nng/nng.h>
     
     int nng_msg_header_insert(nng_msg *msg, const void *val, size_t size);
    -
    -int nng_msg_header_insert_u32(nng_msg *msg, uint32_t val32);
    +int nng_msg_header_insert_u16(nng_msg *msg, uint16_t val16); +int nng_msg_header_insert_u32(nng_msg *msg, uint32_t val32); +int nng_msg_header_insert_u64(nng_msg *msg, uint64_t val64);
    @@ -538,11 +539,12 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

    DESCRIPTION

    -

    The nng_msg_header_insert() and nng_msg_header_insert_u32() functions -prepend data to the front of the headers of message msg, reallocating +

    The nng_msg_header_insert() family of functions +prepends data to the front of the headers of message msg, reallocating if necessary. -The first function prepends size bytes, copying them from val. The -second function prepends the value val32 in network-byte order (big-endian).

    +The first function prepends size bytes, copying them from val. +The remaining functions prepend the specified value (such as val32) in +network-byte order (big-endian).

    @@ -550,7 +552,7 @@ second function prepends the value val32 in network-byte order (big-end

    RETURN VALUES

    -

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

    +

    These functions return 0 on success, and non-zero otherwise.

    diff --git a/man/tip/nng_msg_header_trim.3.html b/man/tip/nng_msg_header_trim.3.html index 207dadc0..0adac176 100644 --- a/man/tip/nng_msg_header_trim.3.html +++ b/man/tip/nng_msg_header_trim.3.html @@ -516,7 +516,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

    NAME

    -

    nng_msg_header_trim, nng_msg_header_trim_u32 - remove data from start of message header

    +

    nng_msg_header_trim - remove data from start of message header

    @@ -528,8 +528,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    #include <nng/nng.h>
     
     int nng_msg_header_trim(nng_msg *msg, size_t size);
    -
    -int nng_msg_header_trim_u32(nng_msg *msg, uint32_t *val32);
    +int nng_msg_header_trim_u16(nng_msg *msg, uint16_t *val16); +int nng_msg_header_trim_u32(nng_msg *msg, uint32_t *val32); +int nng_msg_header_trim_u64(nng_msg *msg, uint64_t *val64);
    @@ -538,10 +539,11 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

    DESCRIPTION

    -

    The nng_msg_header_trim() and nng_msg_header_trim_u32() functions remove +

    The nng_msg_header_trim() family of functions remove data from the start of the header of message msg. The first function removes size bytes. -The second function removes 4 bytes, and stores them in the value val32, +The remaining functions removes 2, 4, or 8 bytes, and stores them in the +value (such as val32), after converting them from network-byte order (big-endian) to native byte order.

    diff --git a/man/tip/nng_msg_insert.3.html b/man/tip/nng_msg_insert.3.html index a18e1181..c0d5e461 100644 --- a/man/tip/nng_msg_insert.3.html +++ b/man/tip/nng_msg_insert.3.html @@ -516,7 +516,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

    NAME

    -

    nng_msg_insert, nng_msg_insert_u32 - prepend to message body

    +

    nng_msg_insert - prepend to message body

    @@ -528,8 +528,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    #include <nng/nng.h>
     
     int nng_msg_insert(nng_msg *msg, const void *val, size_t size);
    -
    -int nng_msg_insert(nng_msg *msg, uint32_t val32);
    +int nng_msg_insert(nng_msg *msg, uint16_t val16); +int nng_msg_insert(nng_msg *msg, uint32_t val32); +int nng_msg_insert(nng_msg *msg, uint64_t val64);
    @@ -538,11 +539,11 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

    DESCRIPTION

    -

    The nng_msg_insert() and nng_msg_insert_u32() functions prepend data to +

    The nng_msg_insert() family of functions prepends data to the front of the body of message msg, reallocating it if necessary. The first function prepends size bytes, copying them from val. -The second function prepends the value val32 in network-byte order -(big-endian).

    +The remaining functions prepend the specified value (such as val32) +in network-byte order (big-endian).

    @@ -551,7 +552,7 @@ The second function prepends the value val32 in network-byte order
    -This function makes use of pre-allocated “headroom” in the message if +These functions make use of pre-allocated “headroom” in the message if available, so it can often avoid performing any reallocation. Applications should use this instead of reallocating and copying message content themselves, in order to benefit from this capability. @@ -565,7 +566,7 @@ content themselves, in order to benefit from this capability.

    RETURN VALUES

    -

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

    +

    These functions return 0 on success, and non-zero otherwise.

    diff --git a/man/tip/nng_msg_trim.3.html b/man/tip/nng_msg_trim.3.html index 3a67da93..9613ad73 100644 --- a/man/tip/nng_msg_trim.3.html +++ b/man/tip/nng_msg_trim.3.html @@ -516,7 +516,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

    NAME

    -

    nng_msg_trim, nng_msg_trim_u32 - remove data from start of message body

    +

    nng_msg_trim - remove data from start of message body

    @@ -528,8 +528,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
    #include <nng/nng.h>
     
     int nng_msg_trim(nng_msg *msg, size_t size);
    -
    -int nng_msg_trim_u32(nng_msg *msg, uint32_t *val32);
    +int nng_msg_trim_u16(nng_msg *msg, uint16_t *val16); +int nng_msg_trim_u32(nng_msg *msg, uint32_t *val32); +int nng_msg_trim_u64(nng_msg *msg, uint64_t *val64);
    @@ -538,10 +539,11 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

    DESCRIPTION

    -

    The nng_msg_trim() and nng_msg_trim_u32() functions remove data from +

    The nng_msg_trim() family of functions removes data from the start of the body of message msg. The first function removes size bytes. -The second function removes 4 bytes, and stores them in the value val32, +The remaining functions remove 2, 4, or 8 bytes, and stores them in the value +(such as val32), after converting them from network-byte order (big-endian) to native byte order.

    @@ -551,7 +553,7 @@ byte order.

    RETURN VALUES

    -

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

    +

    These functions return 0 on success, and non-zero otherwise.

    diff --git a/man/tip/nng_options.5.html b/man/tip/nng_options.5.html index 08de92f3..75016132 100644 --- a/man/tip/nng_options.5.html +++ b/man/tip/nng_options.5.html @@ -920,7 +920,7 @@ Those that do generally have a default value of 8.
    -Each node along a forwarding path may have it’s own value for the +Each node along a forwarding path may have its own value for the maximum time-to-live, and performs its own checks before forwarding a message. Therefore it is helpful if all nodes in the topology use the same value for this option. diff --git a/man/tip/nng_opts_parse.3supp.html b/man/tip/nng_opts_parse.3supp.html index 7b29437c..bc3e26b4 100644 --- a/man/tip/nng_opts_parse.3supp.html +++ b/man/tip/nng_opts_parse.3supp.html @@ -543,7 +543,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b bool o_arg; // Option takes an argument if true } nng_optspec; -int nng_opts_parse(int argc, const char **argv, const nng_optspec *spec, int *val, const char **arg, int *idx); +int nng_opts_parse(int argc, char *const *argv, const nng_optspec *spec, int *val, char **arg, int *idx); diff --git a/man/tip/nng_sockaddr.5.html b/man/tip/nng_sockaddr.5.html index d5e069a9..9ce09af3 100644 --- a/man/tip/nng_sockaddr.5.html +++ b/man/tip/nng_sockaddr.5.html @@ -558,7 +558,7 @@ addresses, IPC paths, and so forth.

    -

    The name sockaddr is based on it’s similarity with POSIX struct sockaddr, +

    The name sockaddr is based on its similarity with POSIX struct sockaddr, but in the nng library, these addresses are more closely affiliated with instances of nng_pipe than of nng_socket. diff --git a/man/tip/nng_stat.5.html b/man/tip/nng_stat.5.html new file mode 100644 index 00000000..102bd09e --- /dev/null +++ b/man/tip/nng_stat.5.html @@ -0,0 +1,622 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_socket(5) + + + + + + +

    +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +
    +typedef struct nng_stat nng_stat;
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    An nng_stat represents a statistic. +All statistics have names (nng_stat_name()) and +descriptions (nng_stat_desc()), and are +typed (nng_stat_type()).

    +
    +
    +

    Most statistics are numeric, +and thus carry a value (nng_stat_value()) +and frequently also a unit that the value measures (nng_stat_unit()).

    +
    +
    +

    Some statistics however, are simply strings (nng_stat_string()), +and thus carry no numeric value.

    +
    +
    +

    Statistics are organized as a tree, and any given statistic can have siblings +(nng_stat_next()). +Note however that generally only NNG_STAT_SCOPE statistics, which are +act as placeholders in the tree (and carry no value), +will have children (nng_stat_child()).

    +
    +
    +

    A tree of statistics is collected using nng_stats_get(), +and can be freed when no longer needed with nng_stats_free(). +This collection process is generally performed in a way to minimize impact +to running operations, but there is still some impact caused by collection +of statistics.

    +
    +
    +

    The time when a statistic’s value is captured can be obtained using +nng_stat_timestap(), which is useful for +measuring rates of change in certain statistics.

    +
    +
    + + + + + +
    + + +The presence, names, and meanings of any given statistic are +subject to change at any time. These statistics are provided as an aid +for debugging, and should generally not be relied upon for programmatic +behaviors. +
    +
    +
    + + + + + +
    + + +Statistics may be disabled by build-time configuration options, +in order to reduce program size and run-time overheads. +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_stat_child.3.html b/man/tip/nng_stat_child.3.html new file mode 100644 index 00000000..549cb231 --- /dev/null +++ b/man/tip/nng_stat_child.3.html @@ -0,0 +1,590 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_version(3) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +
    +typedef struct nng_stat nng_stat;
    +
    +nng_stat *nng_stat_child(nng_stat *parent);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_stat_child() function returns the first child statistic of the +statistic parent. +If no children are present, then NULL is returned.

    +
    +
    + + + + + +
    + + +Only statistics with type (see nng_stat_type()) +of NNG_STAT_SCOPE will have children. +
    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    The first child statistic of parent, or NULL if parent has no children.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    +

    None.

    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_stat_desc.3.html b/man/tip/nng_stat_desc.3.html new file mode 100644 index 00000000..ff60438a --- /dev/null +++ b/man/tip/nng_stat_desc.3.html @@ -0,0 +1,601 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_version(3) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +
    +typedef struct nng_stat nng_stat;
    +
    +const char *nng_stat_desc(nng_stat *stat);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_stat_desc() function returns a brief, human-readable description +for the statistic stat.

    +
    +
    + + + + + +
    + + +This description can be used for a tool-tip in user interfaces +displaying these statistic values. +
    +
    +
    + + + + + +
    + + +At this time, only English descriptions are provided. +
    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    The description of statistic stat.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    +

    None.

    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_stat_name.3.html b/man/tip/nng_stat_name.3.html new file mode 100644 index 00000000..f452b6f7 --- /dev/null +++ b/man/tip/nng_stat_name.3.html @@ -0,0 +1,586 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_version(3) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +
    +typedef struct nng_stat nng_stat;
    +
    +const char *nng_stat_name(nng_stat *stat);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_stat_name() function returns the name for the statistic stat.

    +
    +
    + + + + + +
    + + +The global root statistic will have the empty string ("") as it’s name. +
    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    The name of statistic stat.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    +

    None.

    +
    +
    +
    +
    +

    SEE ALSO

    + +
    +
    + + diff --git a/man/tip/nng_stat_next.3.html b/man/tip/nng_stat_next.3.html new file mode 100644 index 00000000..117e02dc --- /dev/null +++ b/man/tip/nng_stat_next.3.html @@ -0,0 +1,577 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_version(3) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +
    +typedef struct nng_stat nng_stat;
    +
    +nng_stat *nng_stat_next(nng_stat *stat);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_stat_next() function returns the next sibling statistic of the +statistic stat. +If no more siblings are present, then NULL is returned.

    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    The next sibling statistic of stat, or NULL if stat is the last sibling.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    +

    None.

    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_stat_string.3.html b/man/tip/nng_stat_string.3.html new file mode 100644 index 00000000..b57b3737 --- /dev/null +++ b/man/tip/nng_stat_string.3.html @@ -0,0 +1,581 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_version(3) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +
    +typedef struct nng_stat nng_stat;
    +
    +const char *nng_stat_string(nng_stat *stat);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_stat_string() function returns a string value for the statistic stat, +which must be of type NNG_STAT_STRING (see nng_stat_type(3)).

    +
    +
    +

    If the statistic is not of type NNG_STAT_STRING, then NULL will be returned.

    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    The string value associated with stat, or NULL if the statistic is not +a string type.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    +

    None.

    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_stat_timestamp.3.html b/man/tip/nng_stat_timestamp.3.html new file mode 100644 index 00000000..facfa13a --- /dev/null +++ b/man/tip/nng_stat_timestamp.3.html @@ -0,0 +1,610 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_version(3) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +
    +typedef struct nng_stat nng_stat;
    +
    +uint64_t nng_stat_timestamp(nng_stat *stat);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_stat_timestamp() function returns the a timestamp, which is measured +as a number of milliseconds since some arbitrary value in the past.

    +
    +
    +

    Even within the same snapshot, statistics might have different timestamp +values, as the timestamp represents the time when that particular statistic +was captured.

    +
    +
    + + + + + +
    + + +These values are intended to facilitate calculation of rates, by +comparing values from one snapshot with a subsequent one. +
    +
    +
    + + + + + +
    + + +The values used here have the same offset as the +nng_clock() supplementation function. +This can be useful when converting these values to local clock time. +
    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    The timestamp when stat was captured, measured as a number of +milliseconds since some time in the past.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    +

    None.

    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_stat_type.3.html b/man/tip/nng_stat_type.3.html new file mode 100644 index 00000000..2f1d6da1 --- /dev/null +++ b/man/tip/nng_stat_type.3.html @@ -0,0 +1,645 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_version(3) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +
    +typedef struct nng_stat nng_stat;
    +
    +enum {
    +        NNG_STAT_SCOPE,
    +        NNG_STAT_LEVEL,
    +        NNG_STAT_COUNTER,
    +        NNG_STAT_STRING,
    +        NNG_STAT_BOOLEAN,
    +        NNG_STAT_ID
    +};
    +
    +int nng_stat_type(nng_stat *stat);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_stat_type() function returns the type of the statistic stat.

    +
    +
    +

    The returned type will be one of the following values:

    +
    +
    +
    +
    NNG_STAT_SCOPE
    +
    +

    This is a placeholder providing scope, and carries no value on its own. +Instead it is a parent node with child statistics (see +nng_stat_child().)

    +
    +
    NNG_STAT_LEVEL
    +
    +

    This is a numeric statistic, but its value is a level, so rate calculations +based on changes in this value should not be considered significant.

    +
    +
    NNG_STAT_COUNTER
    +
    +

    This is a numeric statistic that represents an increasing count, typically +of events, messages, or bytes. +Frequently, it is interesting to consider changes in this statistic divided +by time to obtain a rate. +(For example, throughput might be calculated as changes in a byte counter +divided by the interval over which the change occurred.)

    +
    +
    NNG_STAT_STRING
    +
    +

    This is a string, and carries no numeric value. +Instead the nng_stat_string(3) function +should be used to obtain the value.

    +
    +
    NNG_STAT_BOOLEAN
    +
    +

    This is a boolean value. +The nng_stat_value() function will return zero +to represent a false value, and one to represent a true value.

    +
    +
    +
    +
    +

    NNG_STAT_ID: +The statistic is a numeric ID. +These are generally immutable values that represent an identity that might +be used with another interface.

    +
    +
    + + + + + +
    + + +For NNG_STAT_COUNTER and NNG_STAT_LEVEL statistics, the +nng_stat_unit() function will provide more +detail about the units measured by the static. +
    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    The statistic type for stat.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    +

    None.

    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_stat_unit.3.html b/man/tip/nng_stat_unit.3.html new file mode 100644 index 00000000..cffb59c5 --- /dev/null +++ b/man/tip/nng_stat_unit.3.html @@ -0,0 +1,636 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_version(3) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +
    +typedef struct nng_stat nng_stat;
    +
    +enum {
    +        NNG_UNIT_NONE,
    +        NNG_UNIT_BYTES,
    +        NNG_UNIT_MESSAGES,
    +        NNG_UNIT_MILLIS,
    +        NNG_UNIT_EVENTS
    +};
    +
    +int nng_stat_unit(nng_stat *stat);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_stat_unit() function returns the unit of quantity measured +by the statistic stat.

    +
    +
    +

    The returned value will be one of the following values:

    +
    +
    +
    +
    NNG_UNIT_NONE
    +
    +

    There are no particular units measured. +In some cases there may be units, but the type of the unit will be obvious +from the name (see nng_stat_name()) of the statistic.

    +
    +
    NNG_UNIT_BYTES
    +
    +

    The statistic is a count of bytes.

    +
    +
    NNG_UNIT_MESSAGES
    +
    +

    The statistic is a count of messages. +Typically, one message corresponds to a single nng_msg structure.

    +
    +
    NNG_UNIT_MILLIS
    +
    +

    The statistic is a count of milliseconds.

    +
    +
    NNG_STAT_EVENTS
    +
    +

    The statistic is a count of some other type of event.

    +
    +
    +
    +
    +

    For statistics that are neither NNG_STAT_COUNTER nor NNG_STAT_LEVEL +type (see nng_stat_type()), the unit will +generally be NNG_UNIT_NONE.

    +
    +
    + + + + + +
    + + +Normally rates can be calculated for NNG_STAT_COUNTER values for +any of these units, but for NNG_UNIT_MILLIS rate calculations are generally +meaningless. +
    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    The units measured by stat.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    +

    None.

    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_stat_value.3.html b/man/tip/nng_stat_value.3.html new file mode 100644 index 00000000..b16fc10d --- /dev/null +++ b/man/tip/nng_stat_value.3.html @@ -0,0 +1,580 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_version(3) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +
    +typedef struct nng_stat nng_stat;
    +
    +uint64_t nng_stat_string(nng_stat *stat);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_stat_value() function returns a numeric value for the statistic stat. +If the statistic has a boolean value, then zero is returned for false, and +one is returned for true. +Otherwise, if the string is not of numeric type, then zero is returned. +See nng_stat_type(3) for a description of statistic types.

    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    The numeric or boolean value associated with stat.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    +

    None.

    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_stats_free.3.html b/man/tip/nng_stats_free.3.html new file mode 100644 index 00000000..9211c46b --- /dev/null +++ b/man/tip/nng_stats_free.3.html @@ -0,0 +1,590 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_free(3) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +
    +typedef nng_stat nng_stat;
    +
    +void nng_stats_free(nng_stat *);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_stats_free() function deallocates a statistics snapshot +previously collected with +nng_stats_get(). +After calling this, all values associated with the snapshot are +invalidated.

    +
    +
    + + + + + +
    + + +Only the top of the collected statistics tree can be +freed using this function. +
    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    None.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    +

    None.

    +
    +
    +
    +
    +

    SEE ALSO

    + +
    +
    + + diff --git a/man/tip/nng_stats_get.3.html b/man/tip/nng_stats_get.3.html new file mode 100644 index 00000000..fa24d6b7 --- /dev/null +++ b/man/tip/nng_stats_get.3.html @@ -0,0 +1,663 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_alloc(3) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +
    +typedef struct nng_stat nng_stat;
    +
    +int nng_stats_get(nng_stat *statsp)
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_stat_get() function attempts to obtain a snapshot of all the +various diagnostic statistics that are present in the system.

    +
    +
    + + + + + +
    + + +The process of collecting statistics is designed to have minimal +impact on the system, but there is still some impact. +
    +
    +
    +

    The statistics are organized as a tree, rooted with a parent +statistic of type NNG_STAT_SCOPE that carries no value, and which +has an empty name. +This parent statistic is returned through the statsp pointer.

    +
    +
    +

    The nng_stat_child() and +nng_stat_next() function can be used to +iterate over the the tree.

    +
    +
    +

    When no longer needed, the statistics can be freed with the +nng_stats_free() function, but that +function must be called only with the root statistic that is returned +through the statsp pointer.

    +
    +
    + + + + + +
    + + +The values of individual statistics are guaranteed to be atomic, +but due the way statistics are collected there can be discrepancies between them at certain times. +For example, statistics counting bytes and messages received may not +reflect the same number of messages, depending on when the snapshot is taken. +This potential inconsistency arises as a result of optimizations to minimize +the impact of statistics on actual operations. +
    +
    +
    + + + + + +
    + + +The names, values, and semantics of statistics provided may change +from release to release. +These are provided for informational and debugging use only, and applications +should not rely on the presence, names, or meanings of any individual statistics. +
    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    This function returns a pointer to the allocated memory on success, +and NULL otherwise.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    + + + + + + + + + +
    +NNG_ENOMEM + +

    Insufficient free memory to collect statistics.

    +
    +NNG_ENOTSUP + +

    Statistics are not supported (compile time option).

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_tls_config_cert_key_file.3tls.html b/man/tip/nng_tls_config_cert_key_file.3tls.html index 2f8c9640..678e7ceb 100644 --- a/man/tip/nng_tls_config_cert_key_file.3tls.html +++ b/man/tip/nng_tls_config_cert_key_file.3tls.html @@ -548,7 +548,7 @@ establishing TLS sessions using cfg. It may contain additional certificates leading to a validation chain, with the leaf certificate first. There is no need to include the self-signed root, as the peer -will need to have that already in order to perform it’s own validation.

    +will need to have that already in order to perform its own validation.

    The private key may be encrypted with a password, in which can be supplied in diff --git a/man/tip/nng_zerotier.7.html b/man/tip/nng_zerotier.7.html index 0a8dda54..4ea2c78c 100644 --- a/man/tip/nng_zerotier.7.html +++ b/man/tip/nng_zerotier.7.html @@ -806,7 +806,7 @@ The default is 500 msec.

    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. +NNG_OPT_ZT_CONN_TIME is at its default of 500. If the value is set to 0, then connection attempts will keep retrying forever.

    @@ -849,7 +849,7 @@ protocol may consume additional space, typically not more than 16-bytes.)

    NNG_OPT_ZT_ORBIT: This is a write-only option that takes an array of two uint64_t values, indicating the ID of a ZeroTier “moon”, and the node ID of the root server - for that moon. (The ID may be zero if the moon ID is the same as it’s + for that moon. (The ID may be zero if the moon ID is the same as its root server ID, which is conventional.)

    -- cgit v1.2.3-70-g09d2