From e0c710189e3fbe6cf8a9b41d961a5e7f7f97fdbc Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 14 Jan 2019 20:57:37 -0800 Subject: man page updates for tip --- man/tip/index.html | 214 +++++++++ man/tip/libnng.3.html | 176 ++++++- man/tip/nng.7.html | 4 +- man/tip/nng_ipc.5.html | 666 ++++++++++++++++++++++++++ man/tip/nng_ipc.7.html | 187 ++------ man/tip/nng_ipc_close.3ipc.html | 615 ++++++++++++++++++++++++ man/tip/nng_ipc_dialer.5.html | 594 ++++++++++++++++++++++++ man/tip/nng_ipc_dialer_alloc.3ipc.html | 590 +++++++++++++++++++++++ man/tip/nng_ipc_dialer_close.3ipc.html | 603 ++++++++++++++++++++++++ man/tip/nng_ipc_dialer_dial.3ipc.html | 650 ++++++++++++++++++++++++++ man/tip/nng_ipc_dialer_free.3ipc.html | 598 ++++++++++++++++++++++++ man/tip/nng_ipc_dialer_getopt.3ipc.html | 632 +++++++++++++++++++++++++ man/tip/nng_ipc_dialer_setopt.3ipc.html | 627 +++++++++++++++++++++++++ man/tip/nng_ipc_free.3ipc.html | 613 ++++++++++++++++++++++++ man/tip/nng_ipc_getopt.3ipc.html | 653 ++++++++++++++++++++++++++ man/tip/nng_ipc_listener.5.html | 595 ++++++++++++++++++++++++ man/tip/nng_ipc_listener_accept.3ipc.html | 634 +++++++++++++++++++++++++ man/tip/nng_ipc_listener_alloc.3ipc.html | 591 +++++++++++++++++++++++ man/tip/nng_ipc_listener_close.3ipc.html | 603 ++++++++++++++++++++++++ man/tip/nng_ipc_listener_free.3ipc.html | 596 ++++++++++++++++++++++++ man/tip/nng_ipc_listener_getopt.3ipc.html | 639 +++++++++++++++++++++++++ man/tip/nng_ipc_listener_listen.3ipc.html | 625 +++++++++++++++++++++++++ man/tip/nng_ipc_listener_setopt.3ipc.html | 649 ++++++++++++++++++++++++++ man/tip/nng_ipc_options.5.html | 747 ++++++++++++++++++++++++++++++ man/tip/nng_ipc_recv.3ipc.html | 660 ++++++++++++++++++++++++++ man/tip/nng_ipc_send.3ipc.html | 659 ++++++++++++++++++++++++++ man/tip/nng_ipc_setopt.3ipc.html | 625 +++++++++++++++++++++++++ man/tip/nng_msg.5.html | 8 +- man/tip/nng_options.5.html | 121 +---- man/tip/nng_tcp.5.html | 6 +- man/tip/nng_tcp.7.html | 50 +- man/tip/nng_tcp_close.3tcp.html | 6 +- man/tip/nng_tcp_dialer.5.html | 4 +- man/tip/nng_tcp_dialer_alloc.3tcp.html | 8 +- man/tip/nng_tcp_dialer_close.3tcp.html | 5 +- man/tip/nng_tcp_dialer_dial.3tcp.html | 8 +- man/tip/nng_tcp_dialer_free.3tcp.html | 3 +- man/tip/nng_tcp_dialer_getopt.3tcp.html | 12 +- man/tip/nng_tcp_dialer_setopt.3tcp.html | 11 +- man/tip/nng_tcp_free.3tcp.html | 4 +- man/tip/nng_tcp_getopt.3tcp.html | 9 +- man/tip/nng_tcp_listener.5.html | 6 +- man/tip/nng_tcp_listener_accept.3tcp.html | 11 +- man/tip/nng_tcp_listener_alloc.3tcp.html | 8 +- man/tip/nng_tcp_listener_close.3tcp.html | 5 +- man/tip/nng_tcp_listener_free.3tcp.html | 3 +- man/tip/nng_tcp_listener_getopt.3tcp.html | 11 +- man/tip/nng_tcp_listener_setopt.3tcp.html | 14 +- man/tip/nng_tcp_options.5.html | 695 +++++++++++++++++++++++++++ man/tip/nng_tcp_recv.3tcp.html | 10 +- man/tip/nng_tcp_send.3tcp.html | 6 +- man/tip/nng_tcp_setopt.3tcp.html | 7 +- man/tip/nng_tls.5.html | 663 ++++++++++++++++++++++++++ man/tip/nng_tls.7.html | 117 ++--- man/tip/nng_tls_close.3tls.html | 615 ++++++++++++++++++++++++ man/tip/nng_tls_config.5.html | 583 +++++++++++++++++++++++ man/tip/nng_tls_config_alloc.3tls.html | 5 +- man/tip/nng_tls_config_hold.3tls.html | 2 +- man/tip/nng_tls_dialer.5.html | 594 ++++++++++++++++++++++++ man/tip/nng_tls_dialer_alloc.3tls.html | 600 ++++++++++++++++++++++++ man/tip/nng_tls_dialer_close.3tls.html | 603 ++++++++++++++++++++++++ man/tip/nng_tls_dialer_dial.3tls.html | 650 ++++++++++++++++++++++++++ man/tip/nng_tls_dialer_free.3tls.html | 597 ++++++++++++++++++++++++ man/tip/nng_tls_dialer_getopt.3tls.html | 651 ++++++++++++++++++++++++++ man/tip/nng_tls_dialer_setopt.3tls.html | 656 ++++++++++++++++++++++++++ man/tip/nng_tls_free.3tls.html | 613 ++++++++++++++++++++++++ man/tip/nng_tls_getopt.3tls.html | 651 ++++++++++++++++++++++++++ man/tip/nng_tls_listener.5.html | 596 ++++++++++++++++++++++++ man/tip/nng_tls_listener_accept.3tls.html | 642 +++++++++++++++++++++++++ man/tip/nng_tls_listener_alloc.3tls.html | 601 ++++++++++++++++++++++++ man/tip/nng_tls_listener_close.3tls.html | 603 ++++++++++++++++++++++++ man/tip/nng_tls_listener_free.3tls.html | 596 ++++++++++++++++++++++++ man/tip/nng_tls_listener_getopt.3tls.html | 650 ++++++++++++++++++++++++++ man/tip/nng_tls_listener_listen.3tls.html | 646 ++++++++++++++++++++++++++ man/tip/nng_tls_listener_setopt.3tls.html | 652 ++++++++++++++++++++++++++ man/tip/nng_tls_options.5.html | 691 +++++++++++++++++++++++++++ man/tip/nng_tls_recv.3tls.html | 668 ++++++++++++++++++++++++++ man/tip/nng_tls_send.3tls.html | 667 ++++++++++++++++++++++++++ man/tip/nng_tls_setopt.3tls.html | 636 +++++++++++++++++++++++++ man/tip/nng_ws.7.html | 18 +- 80 files changed, 30890 insertions(+), 452 deletions(-) create mode 100644 man/tip/nng_ipc.5.html create mode 100644 man/tip/nng_ipc_close.3ipc.html create mode 100644 man/tip/nng_ipc_dialer.5.html create mode 100644 man/tip/nng_ipc_dialer_alloc.3ipc.html create mode 100644 man/tip/nng_ipc_dialer_close.3ipc.html create mode 100644 man/tip/nng_ipc_dialer_dial.3ipc.html create mode 100644 man/tip/nng_ipc_dialer_free.3ipc.html create mode 100644 man/tip/nng_ipc_dialer_getopt.3ipc.html create mode 100644 man/tip/nng_ipc_dialer_setopt.3ipc.html create mode 100644 man/tip/nng_ipc_free.3ipc.html create mode 100644 man/tip/nng_ipc_getopt.3ipc.html create mode 100644 man/tip/nng_ipc_listener.5.html create mode 100644 man/tip/nng_ipc_listener_accept.3ipc.html create mode 100644 man/tip/nng_ipc_listener_alloc.3ipc.html create mode 100644 man/tip/nng_ipc_listener_close.3ipc.html create mode 100644 man/tip/nng_ipc_listener_free.3ipc.html create mode 100644 man/tip/nng_ipc_listener_getopt.3ipc.html create mode 100644 man/tip/nng_ipc_listener_listen.3ipc.html create mode 100644 man/tip/nng_ipc_listener_setopt.3ipc.html create mode 100644 man/tip/nng_ipc_options.5.html create mode 100644 man/tip/nng_ipc_recv.3ipc.html create mode 100644 man/tip/nng_ipc_send.3ipc.html create mode 100644 man/tip/nng_ipc_setopt.3ipc.html create mode 100644 man/tip/nng_tcp_options.5.html create mode 100644 man/tip/nng_tls.5.html create mode 100644 man/tip/nng_tls_close.3tls.html create mode 100644 man/tip/nng_tls_config.5.html create mode 100644 man/tip/nng_tls_dialer.5.html create mode 100644 man/tip/nng_tls_dialer_alloc.3tls.html create mode 100644 man/tip/nng_tls_dialer_close.3tls.html create mode 100644 man/tip/nng_tls_dialer_dial.3tls.html create mode 100644 man/tip/nng_tls_dialer_free.3tls.html create mode 100644 man/tip/nng_tls_dialer_getopt.3tls.html create mode 100644 man/tip/nng_tls_dialer_setopt.3tls.html create mode 100644 man/tip/nng_tls_free.3tls.html create mode 100644 man/tip/nng_tls_getopt.3tls.html create mode 100644 man/tip/nng_tls_listener.5.html create mode 100644 man/tip/nng_tls_listener_accept.3tls.html create mode 100644 man/tip/nng_tls_listener_alloc.3tls.html create mode 100644 man/tip/nng_tls_listener_close.3tls.html create mode 100644 man/tip/nng_tls_listener_free.3tls.html create mode 100644 man/tip/nng_tls_listener_getopt.3tls.html create mode 100644 man/tip/nng_tls_listener_listen.3tls.html create mode 100644 man/tip/nng_tls_listener_setopt.3tls.html create mode 100644 man/tip/nng_tls_options.5.html create mode 100644 man/tip/nng_tls_recv.3tls.html create mode 100644 man/tip/nng_tls_send.3tls.html create mode 100644 man/tip/nng_tls_setopt.3tls.html diff --git a/man/tip/index.html b/man/tip/index.html index 995710ec..4f28b422 100644 --- a/man/tip/index.html +++ b/man/tip/index.html @@ -445,6 +445,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
  • Section 3: Library Functions
  • Section 3compat: Compatible Library Functions
  • Section 3http: Supplemental HTTP Functions
  • +
  • Section 3ipc: Supplemental TCP Functions
  • Section 3supp: Supplemental Functions
  • Section 3tcp: Supplemental TCP Functions
  • Section 3tls: Supplemental TLS Functions
  • @@ -1404,6 +1405,103 @@ Protocols sockets.

    +

    Section 3ipc: Supplemental TCP Functions

    +
    +
    +

    This section documents supplemental TCP functions that are available.

    +
    +
    +

    These functions are made available to facilitate using raw TCP connections +with the NNG asynchronous I/O API. +Most applications should never need to use these functions.

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

    nng_ipc_close(3ipc)

    close IPC connection

    nng_ipc_dialer_alloc(3ipc)

    allocate IPC dialer

    nng_ipc_dialer_close(3ipc)

    close IPC dialer

    nng_ipc_dialer_dial(3ipc)

    initiate outgoing IPC connection

    nng_ipc_dialer_free(3ipc)

    free IPC dialer

    nng_ipc_dialer_getopt(3ipc)

    get option from IPC dialer

    nng_ipc_dialer_setopt(3ipc)

    set option on IPC dialer

    nng_ipc_free(3ipc)

    free IPC connection

    nng_ipc_getopt(3ipc)

    get option from IPC connection

    nng_ipc_listener_accept(3ipc)

    accept incoming IPC connection

    nng_ipc_listener_alloc(3ipc)

    allocate IPC listener

    nng_ipc_listener_close(3ipc)

    close IPC listener

    nng_ipc_listener_free(3ipc)

    free IPC listener

    nng_ipc_listener_getopt(3ipc)

    get option from IPC listener

    nng_ipc_listener_listen(3ipc)

    bind IPC listener

    nng_ipc_listener_setopt(3ipc)

    set option on IPC listener

    nng_ipc_recv(3ipc)

    receive from IPC connection

    nng_ipc_send(3ipc)

    send to IPC connection

    nng_ipc_setopt(3ipc)

    set option on IPC connection

    +
    +
    +

    Section 3supp: Supplemental Functions

    @@ -1614,6 +1712,10 @@ additional support was present and enabled with libnng was built.

    +

    nng_tls_close(3tls)

    +

    close TLS connection

    + +

    nng_tls_config_alloc(3tls)

    allocate TLS configuration object

    @@ -1649,6 +1751,78 @@ additional support was present and enabled with libnng was built.

    nng_tls_config_server_name(3tls)

    configure remote server name

    + +

    nng_tls_dialer_alloc(3tls)

    +

    allocate TLS dialer

    + + +

    nng_tls_dialer_close(3tls)

    +

    close TLS dialer

    + + +

    nng_tls_dialer_dial(3tls)

    +

    initiate outgoing TLS connection

    + + +

    nng_tls_dialer_free(3tls)

    +

    free TLS dialer

    + + +

    nng_tls_dialer_getopt(3tls)

    +

    get option from TLS dialer

    + + +

    nng_tls_dialer_setopt(3tls)

    +

    set option on TLS dialer

    + + +

    nng_tls_free(3tls)

    +

    free TLS connection

    + + +

    nng_tls_getopt(3tls)

    +

    get option from TLS connection

    + + +

    nng_tls_listener_accept(3tls)

    +

    accept incoming TLS connection

    + + +

    nng_tls_listener_alloc(3tls)

    +

    allocate TLS listener

    + + +

    nng_tls_listener_close(3tls)

    +

    close TLS listener

    + + +

    nng_tls_listener_free(3tls)

    +

    free TLS listener

    + + +

    nng_tls_listener_getopt(3tls)

    +

    get option from TLS listener

    + + +

    nng_tls_listener_listen(3tls)

    +

    bind listener to TLS port

    + + +

    nng_tls_listener_setopt(3tls)

    +

    set option on TLS listener

    + + +

    nng_tls_recv(3tls)

    +

    receive from TLS connection

    + + +

    nng_tls_send(3tls)

    +

    send to TLS connection

    + + +

    nng_tls_setopt(3tls)

    +

    set option on TLS connection

    +
    @@ -1690,6 +1864,22 @@ applications need will use.

    scatter/gather element

    +

    nng_ipc(5)

    +

    IPC connection

    + + +

    nng_ipc_dialer(5)

    +

    IPC dialer

    + + +

    nng_ipc_listener(5)

    +

    IPC listener

    + + +

    nng_ipc_options(5)

    +

    IPC-specific options

    + +

    nng_listener(5)

    listener

    @@ -1749,6 +1939,30 @@ applications need will use.

    nng_tcp_listener(5)

    TCP listener

    + +

    nng_tcp_options(5)

    +

    TTCP-specific options

    + + +

    nng_tls(5)

    +

    TLS over TCP connection

    + + +

    nng_tls_config(5)

    +

    message

    + + +

    nng_tls_dialer(5)

    +

    TLS dialer

    + + +

    nng_tls_listener(5)

    +

    TLS listener

    + + +

    nng_tls_options(5)

    +

    TLS-specific options

    +
    diff --git a/man/tip/libnng.3.html b/man/tip/libnng.3.html index 2d374ca0..caa480fd 100644 --- a/man/tip/libnng.3.html +++ b/man/tip/libnng.3.html @@ -527,6 +527,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
  • URL Object
  • Supplemental API
  • Supplemental TCP
  • +
  • Supplemental IPC
  • HTTP Support
  • TLS Configuration Objects
  • @@ -879,7 +880,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() will block the calling thread until the operation has completed.

    @@ -905,7 +906,7 @@ of whether this was successful or not), then a user supplied function (“callback”) is executed.

    -

    A context structure, an nng_aio, is allocated and +

    A context structure, an nng_aio, is allocated and associated with each asynchronous operation. Only a single asynchronous operation may be associated with an nng_aio at any time.

    @@ -1409,6 +1410,98 @@ Most applications won’t need to use these.

    +

    Supplemental IPC

    +
    +

    These IPC functions are available for use with direct interprocess +communication (IPC). +Most applications won’t need to use these.

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

    nng_ipc_close()

    close IPC connection

    nng_ipc_dialer_alloc()

    allocate IPC dialer

    nng_ipc_dialer_close()

    close IPC dialer

    nng_ipc_dialer_dial()

    initiate outgoing IPC connection

    nng_ipc_dialer_free()

    free IPC dialer

    nng_ipc_dialer_getopt()

    get option from IPC dialer

    nng_ipc_dialer_setopt()

    set option on IPC dialer

    nng_ipc_free()

    free IPC connection

    nng_ipc_getopt()

    get option from IPC connection

    nng_ipc_listener_accept()

    accept incoming IPC connection

    nng_ipc_listener_alloc()

    allocate IPC listener

    nng_ipc_listener_close()

    close IPC listener

    nng_ipc_listener_free()

    free IPC listener

    nng_ipc_listener_getopt()

    get option from IPC listener

    nng_ipc_listener_listen()

    bind IPC listener

    nng_ipc_listener_setopt()

    set option on IPC listener

    nng_ipc_recv()

    receive from IPC connection

    nng_ipc_send()

    send to IPC connection

    nng_ipc_setopt()

    set option on IPC connection

    +
    +

    HTTP Support

    The library may be configured with support for HTTP, and this will @@ -1740,7 +1833,8 @@ and connections.

    TLS Configuration Objects

    The following functions are used to manipulate transport layer security -(TLS) configuration objects.

    +(TLS) configuration objects. Most of these functions will not be used even +by TLS applications.

    @@ -1762,6 +1856,10 @@ with TLS support. + + + + @@ -1793,6 +1891,78 @@ with TLS support. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    nng_tls_close()

    close TLS connection

    nng_tls_config_alloc()

    allocate TLS configuration

    nng_tls_config_server_name()

    set remote server name

    nng_tls_dialer_alloc()

    allocate TLS dialer

    nng_tls_dialer_close()

    close TLS dialer

    nng_tls_dialer_dial()

    initiate outgoing TLS connection

    nng_tls_dialer_free()

    free TLS dialer

    nng_tls_dialer_getopt()

    get option from TLS dialer

    nng_tls_dialer_setopt()

    set option on TLS dialer

    nng_tls_free()

    free TLS connection

    nng_tls_getopt()

    get option from TLS connection

    nng_tls_listener_accept()

    accept incoming TLS connection

    nng_tls_listener_alloc()

    allocate TLS listener

    nng_tls_listener_close()

    close TLS listener

    nng_tls_listener_free()

    free TLS listener

    nng_tls_listener_getopt()

    get option from TLS listener

    nng_tls_listener_listen()

    bind TLS listener to port

    nng_tls_listener_setopt()

    set option on TLS listener

    nng_tls_recv()

    receive from TLS connection

    nng_tls_send()

    send to TLS connection

    nng_tls_setopt()

    set option on TLS connection

    diff --git a/man/tip/nng.7.html b/man/tip/nng.7.html index 42d014c0..5a1e763e 100644 --- a/man/tip/nng.7.html +++ b/man/tip/nng.7.html @@ -798,7 +798,7 @@ This is possible using “raw” mode sockets.

    Raw mode sockets are generally constructed with a different function, -such as nng_req0_open_raw(). +such as nng_req0_open_raw(). Using these sockets, the application can simply send and receive messages, and is responsible for supplying any additional socket semantics. Typically this means that the application will need to inspect message @@ -811,7 +811,7 @@ headers on incoming messages, and supply them on outgoing messages.

    -The nng_device() function only works with raw mode +The nng_device() function only works with raw mode sockets, but as it only forwards the messages, no additional application processing is needed. diff --git a/man/tip/nng_ipc.5.html b/man/tip/nng_ipc.5.html new file mode 100644 index 00000000..9e266930 --- /dev/null +++ b/man/tip/nng_ipc.5.html @@ -0,0 +1,666 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_ipc(5) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/ipc/ipc.h>
    +
    +typedef struct nng_ipc_s nng_ipc;
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    An nng_ipc represents a connected stream +using interprocess communication (IPC). +IPC stream objects can be used to send or receive data.

    +
    +
    + + + + + +
    + + +The nng_ipc object is used for raw IPC connections, and +should not be confused with a pipe object created using the +nng_ipc(7) transport. +
    +
    +
    + + + + + +
    + + +Most NNG applications should not use this, but instead use the +nng_ipc(7) transport instead. +
    +
    +
    +

    These objects are created either establishing an outgoing connection +with nng_ipc_dialer_dial() or by +accepting in incoming connection with +nng_ipc_listener_accept().

    +
    +
    +

    IPC connections are byte streams, and are “reliable” in that data +will not be delivered out of order, or with portions missing.

    +
    +
    +

    Data can be sent using nng_ipc_send() or +received with nng_ipc_recv().

    +
    +
    +

    When the connection is no longer needed, it should be freed with +nng_ipc_free().

    +
    +
    + + + + + +
    + + +It is possible to close the connection, without freeing it, by +using nng_ipc_close(). +
    +
    +
    +

    Options

    +
    +

    The following options are applicable to IPC connections, and may be +accessed using the nng_ipc_getopt() and +nng_ipc_setopt() functions.

    +
    + +
    +

    Other platform specific options may be available as well.

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_ipc.7.html b/man/tip/nng_ipc.7.html index f0fba33a..0db5cac3 100644 --- a/man/tip/nng_ipc.7.html +++ b/man/tip/nng_ipc.7.html @@ -620,161 +620,46 @@ longer than 128 bytes, including the ipc:// prefix.

    Socket Address

    -

    When using an nng_sockaddr structure, -the actual structure is of type nng_sockaddr_ipc.

    +

    When using an nng_sockaddr structure, +the actual structure is of type nng_sockaddr_ipc.

    Transport Options

    -
    -
    -
    NNG_OPT_IPC_PERMISSIONS
    -
    -

    (int) -This write-only option may be applied to a listener to configure the -permissions that are used on the UNIX domain socket created by that listener. -This property is only supported on POSIX systems. -The value is of type int, representing the normal permission bits -on a file, such as 0600 (typically meaning read-write to the owner, and -no permissions for anyone else.) -The default is system-specific, most often 0644.

    -
    -
    -
    -
    - - - - - -
    - - -Not all systems validate these permissions. -In particular, illumos and Solaris are known to ignore these permission -settings when connecting. -
    -
    -
    - - - - - -
    - - -Normally both read and write permission will be necessary for a -peer dialer to connect. -See your system documentation for UNIX domain sockets for more information. -
    -
    -
    - - - - - -
    - - -The umask of the process is not applied to these bits. -
    -
    -
    - - - - - -
    - - -The best practice for limiting access is to place the socket in a -directory writable only by the server, and only readable and searchable -by clients. -All mainstream POSIX systems will fail to permit a client to connect -to a socket located in a directory for which the client lacks search (execute) -permission. -
    -
    -
    - - - - - -
    - - -Also consider using the NNG_OPT_IPC_PEER_UID property from within a -a pipe notification callback (nng_pipe_notify()) -to validate peer credentials. -
    -
    -
    -
    -
    NNG_OPT_IPC_SECURITY_DESCRIPTOR
    -
    -

    (PSECURITY_DESCRIPTOR) -This write-only option may be used on listeners on Windows platforms to -configure the SECURITY_DESCRIPTOR that is used when creating the underlying -named pipe. -The value is a pointer, PSECURITY_DESCRIPTOR, and may only be -applied to listeners that have not been started yet.

    -
    -
    NNG_OPT_IPC_PEER_UID
    -
    -

    (uint64_t) -This read-only option may be read from a pipe to determine the peer user id. -This is the effective user id of the peer when either the underlying -listen() or connect() calls were made, and is not forgeable. -This option is generally only available on POSIX systems.

    -
    -
    NNG_OPT_IPC_PEER_GID
    -
    -

    (uint64_t) -This read-only option may be read from a pipe to determine the peer primary -group id. -This is the effective group id of the peer when either the underlying -listen() or connect() calls were made, and is not forgeable. -This option is generally only available on POSIX systems.

    -
    -
    NNG_OPT_IPC_PEER_PID
    -
    -

    (uint64_t) -This read-only option may be read from a pipe to determine the process id -of the peer. -This option is only available on Windows, Linux, and certain other systems.

    -
    -
    -
    -
    - - - - - -
    - - -Applications should not assume that the process ID does not change, -as it is possible (although unsupported!) for a nefarious process to pass a -file descriptor between processes. -However, it is not possible for a nefarious application to forge the identity -of a well-behaved one using this method. -
    +
    +

    The following transport options are supported by this transport, +where supported by the underlying platform.

    -
    -
    -
    NNG_OPT_IPC_PEER_ZONEID
    -
    -

    (uint64_t) -This read-only option may be read from a pipe to determine the zone id -of the peer. -Zones (and this option) are only supported on Solaris and illumos systems.

    -
    -
    +
    @@ -784,6 +669,8 @@ Zones (and this option) are only supported on Solaris and illumos systems.

    diff --git a/man/tip/nng_ipc_close.3ipc.html b/man/tip/nng_ipc_close.3ipc.html new file mode 100644 index 00000000..df9e32f2 --- /dev/null +++ b/man/tip/nng_ipc_close.3ipc.html @@ -0,0 +1,615 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_ipc_close(3ipc) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/ipc/ipc.h>
    +
    +void nng_ipc_close(nng_ipc *conn);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_ipc_close() function closes the supplied IPC connection, conn.

    +
    +
    +

    If any operations are pending (such as nng_ipc_send() +or nng_ipc_recv()) they will be terminated with +an NNG_ECLOSED error condition. +Also, any new operations will fail with NNG_ECLOSED after the connection +is closed.

    +
    +
    + + + + + +
    + + +Closing the connection while data is in transmission will likely +lead to loss of that data. +There is no automatic linger or flush to ensure that the socket send buffers +have completely transmitted. +
    +
    +
    + + + + + +
    + + +Closing the connection does not free the resources associated with it. +Once it is certain that no more operations are pending on the connection, +it should be freed with nng_ipc_free(). +
    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    None.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    +

    None.

    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_ipc_dialer.5.html b/man/tip/nng_ipc_dialer.5.html new file mode 100644 index 00000000..40b5d0a1 --- /dev/null +++ b/man/tip/nng_ipc_dialer.5.html @@ -0,0 +1,594 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_ipc_dialer(5) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/ipc/ipc.h>
    +
    +typedef struct nng_ipc_dialer_s nng_ipc_dialer;
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    +An nng_ipc_dialer is a handle to an IPC “dialer”, which is responsible for +creating connections (nng_ipc objects) by connecting to +remote systems.

    +
    +
    + + + + + +
    + + +The nng_ipc_dialer object is used for raw IPC connections, and +should not be confused with a dialer object created using the +nng_ipc(7) transport. +
    +
    +
    + + + + + +
    + + +Most NNG applications should not use this, but instead use the +nng_ipc(7) transport instead. +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_ipc_dialer_alloc.3ipc.html b/man/tip/nng_ipc_dialer_alloc.3ipc.html new file mode 100644 index 00000000..2fe353e8 --- /dev/null +++ b/man/tip/nng_ipc_dialer_alloc.3ipc.html @@ -0,0 +1,590 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_ipc_dialer_alloc(3ipc) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/ipc/ipc.h>
    +
    +int nng_ipc_dialer_alloc(nng_ipc_dialer *dp);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_ipc_dialer_alloc() allocates an IPC dialer, which can be used +to create outgoing connections over IPC, and stores a pointer to it +it in the location referenced by dp.

    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

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

    +
    +
    +
    +
    +

    ERRORS

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

    Insufficient free memory exists.

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_ipc_dialer_close.3ipc.html b/man/tip/nng_ipc_dialer_close.3ipc.html new file mode 100644 index 00000000..9371e37d --- /dev/null +++ b/man/tip/nng_ipc_dialer_close.3ipc.html @@ -0,0 +1,603 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_ipc_dialer_close(3ipc) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/ipc/ipc.h>
    +
    +void nng_ipc_dialer_close(nng_ipc_dialer *d);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_ipc_dialer_close() function closes the supplied IPC dialer d, +but does not free the underlying resources associated with it.

    +
    +
    +

    If any dial operations using d are +in progress, they will be terminated with an NNG_ECLOSED error condition.

    +
    +
    +

    Furthermore any future accesses to the dialer d will also result in +NNG_ECLOSED.

    +
    +
    + + + + + +
    + + +This function does not release the memory for the dialer, so the +application should still free the memory using +nng_ipc_dialer_free(3ipc) +once it is certain that nothing else is using it. +
    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    None.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    +

    None.

    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_ipc_dialer_dial.3ipc.html b/man/tip/nng_ipc_dialer_dial.3ipc.html new file mode 100644 index 00000000..75689523 --- /dev/null +++ b/man/tip/nng_ipc_dialer_dial.3ipc.html @@ -0,0 +1,650 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_ipc_dialer_dial(3ipc) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/ipc/ipc.h>
    +
    +void nng_ipc_dialer_dial(nng_ipc_dialer *d, const nng_sockaddr *sa, nng_aio *aio);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_ipc_dialer_dial() attempts to establish an IPC connection to the +remote peer identified by sa, using the dialer d. +The operation is completed asynchronously, using aio.

    +
    +
    +

    The address sa must be in the NNG_AF_IPC family, +and have a valid path for IPC.

    +
    +
    +

    If a connection is successfully established, the aio will have the +resulting nng_ipc stored as its first output. +(See nng_aio_get_output().)

    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    None.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +NNG_EADDRINVAL + +

    The address specified is invalid.

    +
    +NNG_ECANCELED + +

    The operation was aborted.

    +
    +NNG_ECLOSED + +

    The dialer is closed.

    +
    +NNG_ECONNREFUSED + +

    The connection was refused by the server.

    +
    +NNG_ECONNRESET + +

    The connection was reset by the server.

    +
    +NNG_ENOMEM + +

    Insufficient free memory exists.

    +
    +NNG_EPERM + +

    Insufficient permission to access the IPC path.

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_ipc_dialer_free.3ipc.html b/man/tip/nng_ipc_dialer_free.3ipc.html new file mode 100644 index 00000000..6a91ee7d --- /dev/null +++ b/man/tip/nng_ipc_dialer_free.3ipc.html @@ -0,0 +1,598 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_ipc_dialer_free(3ipc) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/ipc/ipc.h>
    +
    +void nng_ipc_dialer_free(nng_ipc_dialer *d);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_ipc_dialer_free() function closes the supplied IPC dialer d, +and frees the underlying resources associated with it.

    +
    +
    +

    If any dial operations + using d are +in progress, they will be terminated with an NNG_ECLOSED error condition.

    +
    +
    + + + + + +
    + + +It is important that the application ensure that no further accesses +are made to d, as the memory backing it will be reclaimed for other uses. +
    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    None.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    +

    None.

    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_ipc_dialer_getopt.3ipc.html b/man/tip/nng_ipc_dialer_getopt.3ipc.html new file mode 100644 index 00000000..aa03da47 --- /dev/null +++ b/man/tip/nng_ipc_dialer_getopt.3ipc.html @@ -0,0 +1,632 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_ipc_dialer_getopt(3ipc) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/ipc/ipc.h>
    +
    +int nng_ipc_getopt(nng_ipc_dialer *d, const char *name, void *data, size_t *sizep);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_ipc_dialer_getopt() is used to retrieve the value of the option name for the IPC dialer d. +The size of the buffer located at data to receive the copy is passed by the +caller at the location referenced by sizep. +If this size is sufficient to hold the entire object, the object is copied into +the buffer specified by data. +In either event, the size of the source object (the amount of data copied, +or that would have been copied if sufficient space were available) is stored +at the location of sizep.

    +
    +
    +

    Options

    +
    +

    There are no predefined options for IPC dialers at this time.

    +
    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

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

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    + + + + + + + + + + + + + + + + + +
    +NNG_ECLOSED + +

    The dialer is closed.

    +
    +NNG_EINVAL + +

    There was insufficient space to receive the object. +The amount of data actually needed is returned in sizep.

    +
    +NNG_ENOTSUP + +

    The option name is not supported.

    +
    +NNG_EWRITEONLY + +

    The option name may not read.

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_ipc_dialer_setopt.3ipc.html b/man/tip/nng_ipc_dialer_setopt.3ipc.html new file mode 100644 index 00000000..ddb45213 --- /dev/null +++ b/man/tip/nng_ipc_dialer_setopt.3ipc.html @@ -0,0 +1,627 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_ipc_dialer_setopt(3ipc) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/ipc/ipc.h>
    +
    +int nng_ipc_dialer_setopt(nng_ipc_dialer *d, const char *name, const void *data, size_t size);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_ipc_dialer_setopt() is used to set the option name for the +IPC dialer d. +The value to set is copied from data, which should be size bytes +in length.

    +
    +
    +

    Options

    +
    +

    There are no predefined options for IPC dialers at this time.

    +
    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

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

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    + + + + + + + + + + + + + + + + + +
    +NNG_ECLOSED + +

    The dialer is closed.

    +
    +NNG_EINVAL + +

    Either data or size are invalid.

    +
    +NNG_ENOTSUP + +

    The option name is not supported.

    +
    +NNG_EREADONLY + +

    The option name may not be modified.

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_ipc_free.3ipc.html b/man/tip/nng_ipc_free.3ipc.html new file mode 100644 index 00000000..79345b20 --- /dev/null +++ b/man/tip/nng_ipc_free.3ipc.html @@ -0,0 +1,613 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_ipc_free(3ipc) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/ipc/ipc.h>
    +
    +void nng_ipc_free(nng_ipc *conn);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_ipc_free() function closes the supplied IPC connection, conn, +and frees the underlying resources associated with it.

    +
    +
    +

    If any operations are pending (such as nng_ipc_send() +or nng_ipc_recv()) they will be terminated with +an NNG_ECLOSED error condition.

    +
    +
    + + + + + +
    + + +It is important that the application ensure that no further accesses +are made to conn, as the memory backing it will be reclaimed for other uses. +
    +
    +
    + + + + + +
    + + +Closing the connection while data is in transmission will likely +lead to loss of that data. +There is no automatic linger or flush to ensure that the socket send buffers +have completely transmitted. +
    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    None.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    +

    None.

    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_ipc_getopt.3ipc.html b/man/tip/nng_ipc_getopt.3ipc.html new file mode 100644 index 00000000..0fc84ecc --- /dev/null +++ b/man/tip/nng_ipc_getopt.3ipc.html @@ -0,0 +1,653 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_ipc_getopt(3ipc) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/ipc/ipc.h>
    +
    +int nng_ipc_getopt(nng_ipc *conn, const char *name, void *data, size_t *sizep);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_ipc_getopt() is used to retrieve the value of the option name for +the IPC connection conn. +The size of the buffer located at data to receive the copy is passed by the +caller at the location referenced by sizep. +If this size is sufficient to hold the entire object, the object is copied into +the buffer specified by data. +In either event, the size of the source object (the amount of data copied, +or that would have been copied if sufficient space were available) is stored +at the location of sizep.

    +
    +
    +

    Options

    +
    +

    The options specifically suppported for retrieval from IPC connections are:

    +
    + +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

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

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    + + + + + + + + + + + + + + + + + +
    +NNG_ECLOSED + +

    The connection conn is closed.

    +
    +NNG_EINVAL + +

    There was insufficient space to receive the object. +The amount of data actually needed is returned in sizep.

    +
    +NNG_ENOTSUP + +

    The option name is not supported.

    +
    +NNG_EWRITEONLY + +

    The option name may not read.

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_ipc_listener.5.html b/man/tip/nng_ipc_listener.5.html new file mode 100644 index 00000000..2f2100cf --- /dev/null +++ b/man/tip/nng_ipc_listener.5.html @@ -0,0 +1,595 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_ipc_listener(5) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/ipc/ipc.h>
    +
    +typedef struct nng_ipc_dialer_s nng_ipc_dialer;
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    +An nng_ipc_listener is a handle to an IPC “listener”, which is responsible +for accepting connections (nng_ipc objects) from remote +systems.

    +
    +
    + + + + + +
    + + +The nng_ipc_listener object is used for raw IPC connections, and +should not be confused with a listener object created using the +nng_ipc(7) transport. +
    +
    +
    + + + + + +
    + + +Most NNG applications should not use this, but instead use the +nng_ipc(7) transport instead. +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_ipc_listener_accept.3ipc.html b/man/tip/nng_ipc_listener_accept.3ipc.html new file mode 100644 index 00000000..78150f51 --- /dev/null +++ b/man/tip/nng_ipc_listener_accept.3ipc.html @@ -0,0 +1,634 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_ipc_listener_accept(3ipc) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/ipc/ipc.h>
    +
    +void nng_ipc_listener_accept(nng_ipc_listener *l, nng_aio *aio);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_ipc_listener_accept() attempts to accept an incoming IPC connection +from a remote peer, using the listener l. +The operation is completed asynchronously, using aio.

    +
    +
    +

    This operation can only be done after the listener is already bound to +an IPC path and is listening.

    +
    +
    +

    If a connection is successfully established, the aio will have the +resulting nng_ipc stored as its first output. +(See nng_aio_get_output().)

    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    None.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    +NNG_ECANCELED + +

    The operation was aborted.

    +
    +NNG_ECLOSED + +

    The listener is closed.

    +
    +NNG_ECONNRESET + +

    The connection was reset by the peer.

    +
    +NNG_ENOMEM + +

    Insufficient free memory exists.

    +
    +NNG_ESTATE + +

    The listener is not not listening.

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_ipc_listener_alloc.3ipc.html b/man/tip/nng_ipc_listener_alloc.3ipc.html new file mode 100644 index 00000000..73cc0e57 --- /dev/null +++ b/man/tip/nng_ipc_listener_alloc.3ipc.html @@ -0,0 +1,591 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_ipc_listener_alloc(3ipc) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/ipc/ipc.h>
    +
    +int nng_ipc_listener_alloc(nng_ipc_listener *lp);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_ipc_listener_alloc() allocates an IPC listener, which can be used +to accept incoming connections over IPC, and stores a pointer to it +it in the location referenced by lp.

    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

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

    +
    +
    +
    +
    +

    ERRORS

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

    Insufficient free memory exists.

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_ipc_listener_close.3ipc.html b/man/tip/nng_ipc_listener_close.3ipc.html new file mode 100644 index 00000000..fa795e64 --- /dev/null +++ b/man/tip/nng_ipc_listener_close.3ipc.html @@ -0,0 +1,603 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_ipc_listener_close(3ipc) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/ipc/ipc.h>
    +
    +void nng_ipc_listener_close(nng_ipc_listener *l);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_ipc_listener_close() function closes the supplied IPC listener l, +but does not free the underlying resources associated with it.

    +
    +
    +

    If any accept operations using l +are in progress, they will be terminated with an NNG_ECLOSED error condition.

    +
    +
    +

    Furthermore any future accesses to the listener l will also result in +NNG_ECLOSED.

    +
    +
    + + + + + +
    + + +This function does not release the memory for the listener, so the +application should still free the memory using +nng_ipc_listener_free() +once it is certain that nothing else is using it. +
    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    None.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    +

    None.

    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_ipc_listener_free.3ipc.html b/man/tip/nng_ipc_listener_free.3ipc.html new file mode 100644 index 00000000..7e84af9a --- /dev/null +++ b/man/tip/nng_ipc_listener_free.3ipc.html @@ -0,0 +1,596 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_ipc_listener_free(3ipc) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/ipc/ipc.h>
    +
    +void nng_ipc_listener_free(nng_ipc_listener *l);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_ipc_listener_free() function closes the supplied IPC listener l, +and frees the underlying resources associated with it.

    +
    +
    +

    If any accept operations using l +are in progress, they will be terminated with an NNG_ECLOSED error condition.

    +
    +
    + + + + + +
    + + +It is important that the application ensure that no further accesses +are made to l, as the memory backing it will be reclaimed for other uses. +
    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    None.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    +

    None.

    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_ipc_listener_getopt.3ipc.html b/man/tip/nng_ipc_listener_getopt.3ipc.html new file mode 100644 index 00000000..a645db6f --- /dev/null +++ b/man/tip/nng_ipc_listener_getopt.3ipc.html @@ -0,0 +1,639 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_ipc_listener_getopt(3ipc) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/ipc/ipc.h>
    +
    +int nng_ipc_listener_getopt(nng_ipc_listener *l, const char *name, void *data, size_t *sizep);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_ipc_listener_getopt() is used to retrieve the value of the option name for the IPC listener l. +The size of the buffer located at data to receive the copy is passed by the +caller at the location referenced by sizep. +If this size is sufficient to hold the entire object, the object is copied into +the buffer specified by data. +In either event, the size of the source object (the amount of data copied, +or that would have been copied if sufficient space were available) is stored +at the location of sizep.

    +
    +
    +

    Options

    +
    +

    The only option specifically suppported for retrieval from IPC listeners is:

    +
    +
    + +
    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

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

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    + + + + + + + + + + + + + + + + + +
    +NNG_ECLOSED + +

    The dialer is closed.

    +
    +NNG_EINVAL + +

    There was insufficient space to receive the object. +The amount of data actually needed is returned in sizep.

    +
    +NNG_ENOTSUP + +

    The option name is not supported.

    +
    +NNG_EWRITEONLY + +

    The option name may not read.

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_ipc_listener_listen.3ipc.html b/man/tip/nng_ipc_listener_listen.3ipc.html new file mode 100644 index 00000000..180c570e --- /dev/null +++ b/man/tip/nng_ipc_listener_listen.3ipc.html @@ -0,0 +1,625 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_ipc_listener_listen(3ipc) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/ipc/ipc.h>
    +
    +int nng_ipc_listener_listen(nng_ipc_listener l, const nng_sockaddr *sa);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_ipc_listener_listen() attempts to bind the listener l +to the local address specified by sa, which must be in the +NNG_AF_IPC address family and must have a valid IPC path.

    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

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

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    +NNG_EADDRINUSE + +

    The address specified by sa is already in use.

    +
    +NNG_EADDRINVAL + +

    The address specified by sa is invalid or unavailable.

    +
    +NNG_ECLOSED + +

    The listener l has been closed.

    +
    +NNG_EPERM + +

    Insufficient permission to create the specified IPC path.

    +
    +NNG_ESTATE + +

    The listener l is already bound.

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_ipc_listener_setopt.3ipc.html b/man/tip/nng_ipc_listener_setopt.3ipc.html new file mode 100644 index 00000000..fb91cb11 --- /dev/null +++ b/man/tip/nng_ipc_listener_setopt.3ipc.html @@ -0,0 +1,649 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_ipc_listener_setopt(3ipc) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/ipc/ipc.h>
    +
    +int nng_ipc_listener_setopt(nng_ipc_listener *l, const char *name, const void *data, size_t size);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_ipc_listener_setopt() is used to set the option name for the +IPC listener l. +The value to set is copied from data, which should be size bytes +in length.

    +
    +
    +

    Options

    +
    +

    The options specifically suppported for modification on IPC listeners are:

    +
    + +
    + + + + + +
    + + +Availability of the above options is platform-specific. +
    +
    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

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

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    + + + + + + + + + + + + + + + + + +
    +NNG_ECLOSED + +

    The listener is closed.

    +
    +NNG_EINVAL + +

    Either data or size are invalid.

    +
    +NNG_ENOTSUP + +

    The option name is not supported.

    +
    +NNG_EREADONLY + +

    The option name may not be modified.

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_ipc_options.5.html b/man/tip/nng_ipc_options.5.html new file mode 100644 index 00000000..cd4168de --- /dev/null +++ b/man/tip/nng_ipc_options.5.html @@ -0,0 +1,747 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_ipc_options(5) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +
    +#define NNG_OPT_IPC_PEER_GID            "ipc:peer-gid"
    +#define NNG_OPT_IPC_PEER_PID            "ipc:peer-pid"
    +#define NNG_OPT_IPC_PEER_UID            "ipc:peer-uid"
    +#define NNG_OPT_IPC_PEER_ZONEID         "ipc:peer-zoneid"
    +#define NNG_OPT_IPC_PERMISSIONS         "ipc:permissions"
    +#define NNG_OPT_IPC_SECURITY_DESCRIPTOR "ipc:security-descriptor"
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    This page documents the various standard options that can be set or +retrieved on objects using IPC in the nng library.

    +
    +
    +

    The option names should always be used by their symbolic definitions.

    +
    +
    +

    In the following list of options, the name of the option is supplied, +along with the data type of the underlying value.

    +
    +
    +

    Some options are only meaningful or supported in certain contexts, or may +have other access restrictions. +An attempt has been made to include details about such restrictions in the +description of the option.

    +
    +
    + + + + + +
    + + +The availability of any of the following options is platform-specific, +as the implementations of IPC are quite different on Windows and POSIX systems. +
    +
    +
    +

    IPC Options

    +
    +
    +
    NNG_OPT_IPC_PEER_GID
    +
    +

    (uint64_t) +This read-only option provides a connected peer’s primary +group id. +This is the effective group id of the peer when either the underlying +listen() or connect() calls were made, and is not forgeable. +This option is generally only available on POSIX systems.

    +
    +
    NNG_OPT_IPC_PEER_PID
    +
    +

    (uint64_t) +This read-only option provides the the process id +of the connected peer. +This option is only available on Windows, Linux, and certain other systems.

    +
    + + + + + +
    + + +Applications should not assume that the process ID does not change, +as it is possible (although unsupported!) for a nefarious process to pass a +file descriptor between processes. +However, it is not possible for a nefarious application to forge the identity +of a well-behaved one using this method. +
    +
    +
    +
    NNG_OPT_IPC_PEER_UID
    +
    +

    (uint64_t) +This read-only option provides a connected peer’s user id. +This is the effective user id of the peer when either the underlying +listen() or connect() calls were made, and is not forgeable. +This option is generally only available on POSIX systems.

    +
    +
    NNG_OPT_IPC_PEER_ZONEID
    +
    +

    (uint64_t) +This read-only option provides a connected peer’s the zone id. +Zones (and this option) are only supported on Solaris and illumos systems.

    +
    +
    NNG_OPT_IPC_PERMISSIONS
    +
    +

    (int) +This write-only option may be applied to a listener to configure the +permissions that are used on the UNIX domain socket created by that listener. +This property is only supported on POSIX systems. +The value is of type int, representing the normal permission bits +on a file, such as 0600 (typically meaning read-write to the owner, and +no permissions for anyone else.) +The default is system-specific, most often 0644.

    +
    + + + + + +
    + + +Not all systems validate these permissions. +In particular, illumos and Solaris are known to ignore these permission +settings when connecting. +
    +
    +
    + + + + + +
    + + +Normally both read and write permission will be necessary for a +peer dialer to connect. +See your system documentation for UNIX domain sockets for more information. +
    +
    +
    + + + + + +
    + + +The umask of the process is not applied to these bits. +
    +
    +
    + + + + + +
    + + +The best practice for limiting access is to place the socket in a +directory writable only by the server, and only readable and searchable +by clients. +All mainstream POSIX systems will fail to permit a client to connect +to a socket located in a directory for which the client lacks search (execute) +permission. +
    +
    +
    +
    NNG_OPT_IPC_SECURITY_DESCRIPTOR
    +
    +

    (PSECURITY_DESCRIPTOR) +This write-only option may be used on listeners on Windows platforms to +configure the SECURITY_DESCRIPTOR that is used when creating the underlying +named pipe. +The value is a pointer, PSECURITY_DESCRIPTOR, and may only be +applied to listeners that have not been started yet.

    +
    +
    +
    +
    +
    +

    Inherited Options

    +
    +

    Generally, the following option values are also available for TLS objects, +when appropriate for the context:

    +
    + +
    +
    +
    + +
    + + diff --git a/man/tip/nng_ipc_recv.3ipc.html b/man/tip/nng_ipc_recv.3ipc.html new file mode 100644 index 00000000..ab07281f --- /dev/null +++ b/man/tip/nng_ipc_recv.3ipc.html @@ -0,0 +1,660 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_ipc_recv(3ipc) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/ipc/ipc.h>
    +
    +void nng_ipc_recv(nng_ipc *conn, nng_aio *aio);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_ipc_recv() function starts an asynchronous receive from the +IPC connection conn, into the scatter/gather vector located in the +asynchronous I/O structure aio.

    +
    +
    + + + + + +
    + + +The nng_aio_set_iov() function must have been +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 either be zero or an error code.

    +
    +
    +

    The I/O operation completes as soon as at least one byte has been +received, or an error has occurred. +Therefore, the number of bytes read may be less than requested. +The actual number of bytes read can be determined with +nng_aio_count().

    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    None.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    +NNG_ECANCELED + +

    The operation was canceled.

    +
    +NNG_ECLOSED + +

    The connection was closed.

    +
    +NNG_ECONNRESET + +

    The peer closed the connection.

    +
    +NNG_EINVAL + +

    The aio does not contain a valid scatter/gather vector.

    +
    +NNG_ENOMEM + +

    Insufficient free memory to perform the operation.

    +
    +NNG_ETIMEDOUT + +

    Timeout waiting for data from the connection.

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_ipc_send.3ipc.html b/man/tip/nng_ipc_send.3ipc.html new file mode 100644 index 00000000..4bef078f --- /dev/null +++ b/man/tip/nng_ipc_send.3ipc.html @@ -0,0 +1,659 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_ipc_send(3ipc) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/ipc/ipc.h>
    +
    +void nng_ipc_send(nng_ipc *conn, nng_aio *aio);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_ipc_send() function starts an asynchronous send over the +IPC connection conn from the scatter/gather vector located in the +asynchronous I/O structure aio.

    +
    +
    + + + + + +
    + + +The nng_aio_set_iov() function must have been +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 either be zero or an error code.

    +
    +
    +

    The I/O operation completes as soon as at least one byte has been +sent, or an error has occurred. +Therefore, the number of bytes sent may be less than requested. +The actual number of bytes sent can be determined with +nng_aio_count().

    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    None.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    +NNG_ECANCELED + +

    The operation was canceled.

    +
    +NNG_ECLOSED + +

    The connection was closed.

    +
    +NNG_ECONNRESET + +

    The peer closed the connection.

    +
    +NNG_EINVAL + +

    The aio does not contain a valid scatter/gather vector.

    +
    +NNG_ENOMEM + +

    Insufficient free memory to perform the operation.

    +
    +NNG_ETIMEDOUT + +

    Timeout waiting for data from the connection.

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_ipc_setopt.3ipc.html b/man/tip/nng_ipc_setopt.3ipc.html new file mode 100644 index 00000000..c1e2508c --- /dev/null +++ b/man/tip/nng_ipc_setopt.3ipc.html @@ -0,0 +1,625 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_ipc_setopt(3ipc) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/ipc/ipc.h>
    +
    +int nng_ipc_setopt(nng_ipc *conn, const char *name, const void *data, size_t size);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_ipc_setopt() is used to set the option name for the +IPC connection conn. +The value to set is copied from data, which should be size bytes +in length.

    +
    +
    +

    Options

    +
    +

    There are no options defined for modification on IPC connections at this time.

    +
    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

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

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    + + + + + + + + + + + + + + + + + +
    +NNG_ECLOSED + +

    The connection conn is closed.

    +
    +NNG_EINVAL + +

    Either data or size are invalid.

    +
    +NNG_ENOTSUP + +

    The option name is not supported.

    +
    +NNG_EREADONLY + +

    The option name may not be modified.

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_msg.5.html b/man/tip/nng_msg.5.html index 16a9e672..413fc31c 100644 --- a/man/tip/nng_msg.5.html +++ b/man/tip/nng_msg.5.html @@ -9,7 +9,7 @@ layout: refman -nng_msg_alloc(3) +nng_msg(5) + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +
    +
    +#define NNG_OPT_TCP_NODELAY   "tcp-nodelay"
    +#define NNG_OPT_TCP_KEEPALIVE "tcp-keepalive"
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    This page documents the various standard options that can be set or +retrieved on objects using TCP in the nng library.

    +
    +
    +

    The option names should always be used by their symbolic definitions.

    +
    +
    +

    In the following list of options, the name of the option is supplied, +along with the data type of the underlying value.

    +
    +
    +

    Some options are only meaningful or supported in certain contexts, or may +have other access restrictions. +An attempt has been made to include details about such restrictions in the +description of the option.

    +
    +
    +

    The following options are generally application to objects making use of +TCP/IP communications.

    +
    +
    +

    TCP Options

    +
    +
    +
    NNG_OPT_TCP_NODELAY
    +
    +

    (bool) +This option is used to disable (or enable) the use of Nagle’s algorithm +for TCP connections.

    +
    + + + + + +
    + + +This setting may apply to transports that are built on top of TCP. +See the transport documentation for each transport for details. +
    +
    +
    +

    When true (the default), messages are sent immediately by the underlying +TCP stream without waiting to gather more data.

    +
    +
    +

    When false, Nagle’s algorithm is enabled, and the TCP stream may +wait briefly in attempt to coalesce messages. +Nagle’s algorithm is useful on low-bandwidth connections to reduce overhead, +but it comes at a cost to latency.

    +
    +
    +

    When used on a dialer or a listener, the value affects how newly +created connections will be configured.

    +
    +
    +
    +
    +
    +
    +
    NNG_OPT_TCP_KEEPALIVE
    +
    +

    (bool) +This option is used to enable the sending of keep-alive messages on +the underlying TCP stream. +This option is false by default.

    +
    + + + + + +
    + + +This setting may apply to transports that are built on top of TCP. +See the transport documentation for each transport for details. +
    +
    +
    +

    When enabled, if no messages are seen for a period of time, then +a zero length TCP message is sent with the ACK flag set in an attempt +to tickle some traffic from the peer. +If none is still seen (after some platform-specific number of retries and +timeouts), then the remote peer is presumed dead, and the connection is closed.

    +
    +
    +

    When used on a dialer or a listener, the value affects how newly +created connections will be configured.

    +
    +
    + + + + + +
    + + +This option has two purposes. +First, it can be used to detect dead peers on an otherwise quiescent network. +Second, it can be used to keep connection table entries in NAT and other +middleware from being expiring due to lack of activity. +
    +
    +
    +
    +
    +
    +
    +

    Inherited Options

    +
    +

    Generally, the following option values are also available for TCP objects, +when appropriate for the context:

    +
    + +
    +
    +
    + +
    + + diff --git a/man/tip/nng_tcp_recv.3tcp.html b/man/tip/nng_tcp_recv.3tcp.html index a8cd6b1c..1af27986 100644 --- a/man/tip/nng_tcp_recv.3tcp.html +++ b/man/tip/nng_tcp_recv.3tcp.html @@ -553,7 +553,7 @@ asynchronous I/O structure aio.

    -The nng_aio_set_iov() function must have been +The nng_aio_set_iov() function must have been called first, to set the scatter/gather vector for aio. @@ -563,7 +563,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(). +nng_aio_result(). That result will either be zero or an error code.

    @@ -571,7 +571,7 @@ That result will either be zero or an error code.

    received, or an error has occurred. Therefore, the number of bytes read may be less than requested. The actual number of bytes read can be determined with -nng_aio_count().

    +nng_aio_count().

    @@ -661,10 +661,10 @@ used by very few protocols and this API does not support it. nng_aio_count(3), nng_aio_result(3), nng_aio_set_iov(3), +nng_strerror(3), nng_tcp_close(3tcp), nng_tcp_send(3tcp), -nng_tcp(5), -nng_strerror(3)

    +nng_tcp(5)

    diff --git a/man/tip/nng_tcp_send.3tcp.html b/man/tip/nng_tcp_send.3tcp.html index e1e84580..bdb61222 100644 --- a/man/tip/nng_tcp_send.3tcp.html +++ b/man/tip/nng_tcp_send.3tcp.html @@ -553,7 +553,7 @@ asynchronous I/O structure aio.

    @@ -562,7 +562,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(). +result may be obtained via nng_aio_result(). That result will either be zero or an error code.

    @@ -570,7 +570,7 @@ That result will either be zero or an error code.

    sent, or an error has occurred. Therefore, the number of bytes sent may be less than requested. The actual number of bytes sent can be determined with -nng_aio_count().

    +nng_aio_count().

    -The nng_aio_set_iov() function must have been +The nng_aio_set_iov() function must have been called first, to set the scatter/gather vector for aio.
    diff --git a/man/tip/nng_tcp_setopt.3tcp.html b/man/tip/nng_tcp_setopt.3tcp.html index 31a3f042..600165db 100644 --- a/man/tip/nng_tcp_setopt.3tcp.html +++ b/man/tip/nng_tcp_setopt.3tcp.html @@ -547,7 +547,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

    The nng_tcp_setopt() is used to set the option name for the -TCP connection conn. +TCP connection conn. The value to set is copied from data, which should be size bytes in length.

    @@ -560,10 +560,10 @@ connections are:

    @@ -625,6 +625,7 @@ connections are:

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

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/tls/tls.h>
    +
    +typedef struct nng_tls_s nng_tls;
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    An nng_tls represents a connected stream. +TLS stream objects can be used to send or receive data, and +provide transport level security via cryptography over a TCP connected +stream.

    +
    +
    +
    + + + + +
    + + +The nng_tls object is used for raw TLS connections, and +should not be confused with a pipe object created using the +nng_tls(7) transport. +
    +
    +
    + + + + + +
    + + +Most NNG applications should not use this, but instead use the +nng_tls(7) transport instead. +
    +
    +
    +

    These objects are created either establishing an outgoing connection +with nng_tls_dialer_dial() or by +accepting in incoming connection with +nng_tls_listener_accept().

    +
    +
    +

    TLS connections are byte streams, and are “reliable” in that data +will not be delivered out of order, or with portions missing.

    +
    +
    +

    Data can be sent using nng_tls_send() or +received with nng_tls_recv().

    +
    +
    +

    When the connection is no longer needed, it should be freed with +nng_tls_free().

    +
    +
    + + + + + +
    + + +It is possible to close the connection, without freeing it, by +using nng_tls_close(). +
    +
    +
    +

    Options

    +
    +

    The following options are applicable to TLS connections, and may be +accessed using the nng_tls_getopt() and +nng_tls_setopt() functions.

    +
    + +
    +

    Other platform specific options may be available as well.

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_tls.7.html b/man/tip/nng_tls.7.html index 41e900a2..8d94daa3 100644 --- a/man/tip/nng_tls.7.html +++ b/man/tip/nng_tls.7.html @@ -563,7 +563,7 @@ Both IPv4 and IPv6 are supported when the underlying platform also supports it.<

    Depending upon how the library was built, it may be necessary to register the transport by calling -nng_tls_register().

    +nng_tls_register().

    @@ -713,10 +713,10 @@ and could be used to listen to port 9999 on the host:

    Socket Address

    -

    When using an nng_sockaddr structure, +

    When using an nng_sockaddr structure, the actual structure is either of type -nng_sockaddr_in (for IPv4) or -nng_sockaddr_in6 (for IPv6).

    +nng_sockaddr_in (for IPv4) or +nng_sockaddr_in6 (for IPv6).

    @@ -725,78 +725,39 @@ the actual structure is either of type

    The following transport options are available. Note that setting these must be done before the transport is started.

    -
    -
    -
    NNG_OPT_TCP_KEEPALIVE
    -
    -

    (bool) Enable TCP keep-alives, defaults to false.

    -
    -
    NNG_OPT_TCP_NODELAY
    -
    -

    (bool) Disable Nagle’s algorithm. -When enabled (false), the underlying TCP stream will attempt -to buffer and coalesce messages before sending them on, waiting -a short interval to improve buffering and reduce the overhead -caused by sending too-small messages. -This comes at a cost to latency, and is not recommended with modern -high speed networks. -Defaults to true.

    -
    -
    NNG_OPT_TLS_CONFIG
    -
    -

    (nng_tls_config *) -The underlying TLS -configuration object. -A hold is placed on the underlying -configuration object before returning it. -The caller should release the hold with -nng_tls_config_free() when it no -longer needs the TLS configuration object.

    -
    -
    -
    -
    - - - - - -
    - - -Use this option when advanced TLS configuration is required. -
    -
    -
    -
    -
    NNG_OPT_TLS_CA_FILE
    -
    -

    (string) Write-only option naming a file containing certificates to -use for peer validation. -See nng_tls_config_ca_file() for more -information.

    -
    -
    NNG_OPT_TLS_CERT_KEY_FILE
    -
    -

    (string) Write-only option naming a file containing the local certificate and -associated private key. -The private key used must be unencrypted. -See nng_tls_config_own_cert() for more -information.

    -
    -
    NNG_OPT_TLS_AUTH_MODE
    -
    -

    (int) Write-only option used to configure the authentication mode used. -See nng_tls_config_auth_mode() for -more details.

    -
    -
    NNG_OPT_TLS_VERIFIED
    -
    -

    (bool) Whether the remote peer has been properly verified using TLS -authentication. -May return incorrect results if peer authentication is disabled.

    -
    -
    +
    @@ -806,8 +767,12 @@ May return incorrect results if peer authentication is disabled.

    diff --git a/man/tip/nng_tls_close.3tls.html b/man/tip/nng_tls_close.3tls.html new file mode 100644 index 00000000..3bedc39d --- /dev/null +++ b/man/tip/nng_tls_close.3tls.html @@ -0,0 +1,615 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_tls_close(3tls) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/tls/tls.h>
    +
    +void nng_tls_close(nng_tls *conn);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_tls_close() function closes the supplied TLS connection, conn.

    +
    +
    +

    If any operations are pending (such as nng_tls_send() +or nng_tls_recv() they will be terminated with +an NNG_ECLOSED error condition. +Also, any new operations will fail with NNG_ECLOSED after the connection +is closed.

    +
    +
    + + + + + +
    + + +Closing the connection while data is in transmission will likely +lead to loss of that data. +There is no automatic linger or flush to ensure that the socket send buffers +have completely transmitted. +
    +
    +
    + + + + + +
    + + +Closing the connection does not free the resources associated with it. +Once it is certain that no more operations are pending on the connection, +it should be freed with nng_tls_free(). +
    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    None.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    +

    None.

    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_tls_config.5.html b/man/tip/nng_tls_config.5.html new file mode 100644 index 00000000..d50d6382 --- /dev/null +++ b/man/tip/nng_tls_config.5.html @@ -0,0 +1,583 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_tls_config(5) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/supplemental/tls/tls.h>
    +
    +typedef struct nng_tls_config nng_tls_config;
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    An nng_tls_config represents a single TLS configuration object, which +can be used to configure TLS servers and clients.

    +
    +
    +

    Configuration data includes details such as certificate chains used for +validation of remote peers, local key and certificate material, server +names, and so forth. +Additionally, a configuration can be used either in client mode, or in +server mode.

    +
    +
    +

    Configuration objects may be shared, and are reference counted. +However once a configuration is used, it enters a read-only state that +precludes further modifications to the configuration.

    +
    +
    +

    Messages are allocated using the +nng_tls_config_alloc() +function, and are deallocated using the +nng_tls_config_free() +function.

    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_tls_config_alloc.3tls.html b/man/tip/nng_tls_config_alloc.3tls.html index 499a8b6b..c28b5bd8 100644 --- a/man/tip/nng_tls_config_alloc.3tls.html +++ b/man/tip/nng_tls_config_alloc.3tls.html @@ -571,9 +571,9 @@ that object is not inadvertently freed while in use.

    A configuration object created with nng_tls_config_alloc() starts with a reference count of one. The reference count may be incremented using -nng_tls_config_hold() and may be +nng_tls_config_hold() and may be decremented with -nng_tls_config_free().

    +nng_tls_config_free().

    Also note that a TLS configuration object becomes “read-only” after it @@ -627,6 +627,7 @@ further changes to the configuration will result in NNG_EBUSY.

    nng_tls_config_free(3tls), nng_tls_config_hold(3tls), nng_tls_config_server_name(3tls), +nng_tls_config(5), nng(7)

    diff --git a/man/tip/nng_tls_config_hold.3tls.html b/man/tip/nng_tls_config_hold.3tls.html index 3c363575..3ebbccc2 100644 --- a/man/tip/nng_tls_config_hold.3tls.html +++ b/man/tip/nng_tls_config_hold.3tls.html @@ -548,7 +548,7 @@ from being freed while in use.

    The hold can be released by calling -nng_tls_config_free().

    +nng_tls_config_free().

    Multiple holds can be placed on a configuration object; the object diff --git a/man/tip/nng_tls_dialer.5.html b/man/tip/nng_tls_dialer.5.html new file mode 100644 index 00000000..457b1605 --- /dev/null +++ b/man/tip/nng_tls_dialer.5.html @@ -0,0 +1,594 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_tls_dialer(5) + + + + + + +

    +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/tls/tls.h>
    +
    +typedef struct nng_tls_dialer_s nng_tls_dialer;
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    +An nng_tls_dialer is a handle to a TLS “dialer”, which is responsible for +creating connections (nng_tls objects) by connecting to +remote systems.

    +
    +
    + + + + + +
    + + +The nng_tls_dialer object is used for raw IPC connections, and +should not be confused with a dialer object created using the +nng_tls(7) transport. +
    +
    +
    + + + + + +
    + + +Most NNG applications should not use this, but instead use the +nng_tls(7) transport instead. +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_tls_dialer_alloc.3tls.html b/man/tip/nng_tls_dialer_alloc.3tls.html new file mode 100644 index 00000000..61021f26 --- /dev/null +++ b/man/tip/nng_tls_dialer_alloc.3tls.html @@ -0,0 +1,600 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_tls_dialer_alloc(3tls) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/tls/tls.h>
    +
    +int nng_tls_dialer_alloc(nng_tls_dialer *dp);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_tls_dialer_alloc() allocates a TLS dialer, which can be used +to create outgoing connections over TLS, and stores a pointer to it +it in the location referenced by dp.

    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

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

    +
    +
    +
    +
    +

    ERRORS

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

    Insufficient free memory exists.

    +
    +NNG_ENOTSUP + +

    TLS support not configured in library.

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_tls_dialer_close.3tls.html b/man/tip/nng_tls_dialer_close.3tls.html new file mode 100644 index 00000000..86e23e38 --- /dev/null +++ b/man/tip/nng_tls_dialer_close.3tls.html @@ -0,0 +1,603 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_tls_dialer_close(3tls) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/tls/tls.h>
    +
    +void nng_tls_dialer_close(nng_tls_dialer *d);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_tls_dialer_close() function closes the supplied TCP dialer d, +but does not free the underlying resources associated with it.

    +
    +
    +

    If any dial operations using d are +in progress, they will be terminated with an NNG_ECLOSED error condition.

    +
    +
    +

    Furthermore any future accesses to the dialer d will also result in +NNG_ECLOSED.

    +
    +
    + + + + + +
    + + +This function does not release the memory for the dialer, so the +application should still free the memory using +nng_tls_dialer_free() +once it is certain that nothing else is using it. +
    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    None.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    +

    None.

    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_tls_dialer_dial.3tls.html b/man/tip/nng_tls_dialer_dial.3tls.html new file mode 100644 index 00000000..8086b01f --- /dev/null +++ b/man/tip/nng_tls_dialer_dial.3tls.html @@ -0,0 +1,650 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_tls_dialer_dial(3tls) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/tls/tls.h>
    +
    +void nng_tls_dialer_dial(nng_tls_dialer *d, const nng_sockaddr *sa, nng_aio *aio);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_tls_dialer_dial() attempts to establish a TLS connection to the +remote peer identified by sa, using the dialer d. +The operation is completed asynchronously, using aio.

    +
    +
    +

    The address sa must be in the NNG_AF_INET or NNG_AF_INET6 families, +and have a valid IPv4 or IPv6 address and TCP port number.

    +
    +
    +

    If a connection is successfully established, the aio will have the +resulting nng_tls stored as its first output. +(See nng_aio_get_output().)

    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    None.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +NNG_EADDRINVAL + +

    The address specified is invalid.

    +
    +NNG_ECANCELED + +

    The operation was aborted.

    +
    +NNG_ECLOSED + +

    The dialer is closed.

    +
    +NNG_ECONNREFUSED + +

    The connection was refused by the server.

    +
    +NNG_ECONNRESET + +

    The connection was reset by the server.

    +
    +NNG_ECRYPTO + +

    Cryptographic or certificate validation error.

    +
    +NNG_ENOMEM + +

    Insufficient free memory exists.

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_tls_dialer_free.3tls.html b/man/tip/nng_tls_dialer_free.3tls.html new file mode 100644 index 00000000..99e968ee --- /dev/null +++ b/man/tip/nng_tls_dialer_free.3tls.html @@ -0,0 +1,597 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_tls_dialer_free(3tls) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/tls/tls.h>
    +
    +void nng_tls_dialer_free(nng_tls_dialer *d);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_tls_dialer_free() function closes the supplied TLS dialer d, +and frees the underlying resources associated with it.

    +
    +
    +

    If any dial operations using d are +in progress, they will be terminated with an NNG_ECLOSED error condition.

    +
    +
    + + + + + +
    + + +It is important that the application ensure that no further accesses +are made to d, as the memory backing it will be reclaimed for other uses. +
    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    None.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    +

    None.

    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_tls_dialer_getopt.3tls.html b/man/tip/nng_tls_dialer_getopt.3tls.html new file mode 100644 index 00000000..3e117cc1 --- /dev/null +++ b/man/tip/nng_tls_dialer_getopt.3tls.html @@ -0,0 +1,651 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_tls_dialer_getopt(3tls) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/tls/tls.h>
    +
    +int nng_tls_getopt(nng_tls_dialer *d, const char *name, void *data, size_t *sizep);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_tls_dialer_getopt() is used to retrieve the value of the option name +for the TLS dialer d. +The size of the buffer located at data to receive the copy is passed by the +caller at the location referenced by sizep. +If this size is sufficient to hold the entire object, the object is copied into +the buffer specified by data. +In either event, the size of the source object (the amount of data copied, +or that would have been copied if sufficient space were available) is stored +at the location of sizep.

    +
    +
    +

    Options

    +
    +

    The options specifically suppported for retrieval from TLS dialers are:

    +
    + +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

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

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    + + + + + + + + + + + + + + + + + +
    +NNG_ECLOSED + +

    The dialer is closed.

    +
    +NNG_EINVAL + +

    There was insufficient space to receive the object. +The amount of data actually needed is returned in sizep.

    +
    +NNG_ENOTSUP + +

    The option name is not supported.

    +
    +NNG_EWRITEONLY + +

    The option name may not read.

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_tls_dialer_setopt.3tls.html b/man/tip/nng_tls_dialer_setopt.3tls.html new file mode 100644 index 00000000..b40f740d --- /dev/null +++ b/man/tip/nng_tls_dialer_setopt.3tls.html @@ -0,0 +1,656 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_tls_dialer_setopt(3tls) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/tls/tls.h>
    +
    +int nng_tls_dialer_setopt(nng_tls_dialer *d, const char *name, const void *data, size_t size);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_tls_dialer_setopt() is used to set the option name for the +TLS dialer d. +The value to set is copied from data, which should be size bytes +in length.

    +
    +
    +

    Options

    +
    +

    The options specifically suppported for modification on TLS dialers are:

    +
    + +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

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

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    + + + + + + + + + + + + + + + + + +
    +NNG_ECLOSED + +

    The dialer is closed.

    +
    +NNG_EINVAL + +

    Either data or size are invalid.

    +
    +NNG_ENOTSUP + +

    The option name is not supported.

    +
    +NNG_EREADONLY + +

    The option name may not be modified.

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_tls_free.3tls.html b/man/tip/nng_tls_free.3tls.html new file mode 100644 index 00000000..734a6e5d --- /dev/null +++ b/man/tip/nng_tls_free.3tls.html @@ -0,0 +1,613 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_tls_free(3tls) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/tls/tls.h>
    +
    +void nng_tls_free(nng_tls *conn);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_tls_free() function closes the supplied TLS connection, conn, +and frees the underlying resources associated with it.

    +
    +
    +

    If any operations are pending (such as nng_tls_send() +or nng_tls_recv() they will be terminated with +an NNG_ECLOSED error condition.

    +
    +
    + + + + + +
    + + +It is important that the application ensure that no further accesses +are made to conn, as the memory backing it will be reclaimed for other uses. +
    +
    +
    + + + + + +
    + + +Closing the connection while data is in transmission will likely +lead to loss of that data. +There is no automatic linger or flush to ensure that the socket send buffers +have completely transmitted. +
    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    None.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    +

    None.

    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_tls_getopt.3tls.html b/man/tip/nng_tls_getopt.3tls.html new file mode 100644 index 00000000..fe61ed5c --- /dev/null +++ b/man/tip/nng_tls_getopt.3tls.html @@ -0,0 +1,651 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_tls_getopt(3tls) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/tls/tls.h>
    +
    +int nng_tls_getopt(nng_tls *conn, const char *name, void *data, size_t *sizep);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_tls_getopt() is used to retrieve the value of the option name for +the TLS connection conn. +The size of the buffer located at data to receive the copy is passed by the +caller at the location referenced by sizep. +If this size is sufficient to hold the entire object, the object is copied into +the buffer specified by data. +In either event, the size of the source object (the amount of data copied, +or that would have been copied if sufficient space were available) is stored +at the location of sizep.

    +
    +
    +

    Options

    +
    +

    The options specifically suppported for retrieval from TLS connections are:

    +
    + +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

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

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    + + + + + + + + + + + + + + + + + +
    +NNG_ECLOSED + +

    The connection conn is closed.

    +
    +NNG_EINVAL + +

    There was insufficient space to receive the object. +The amount of data actually needed is returned in sizep.

    +
    +NNG_ENOTSUP + +

    The option name is not supported.

    +
    +NNG_EWRITEONLY + +

    The option name may not read.

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_tls_listener.5.html b/man/tip/nng_tls_listener.5.html new file mode 100644 index 00000000..cac301c1 --- /dev/null +++ b/man/tip/nng_tls_listener.5.html @@ -0,0 +1,596 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_tls_listener(5) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/tls/tls.h>
    +
    +typedef struct nng_tls_dialer_s nng_tls_dialer;
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    +An nng_tls_listener is a handle to a TLS “listener”, which is responsible +for accepting connections (nng_tls objects) from remote +systems.

    +
    +
    + + + + + +
    + + +The nng_tls_listener object is used for raw TLS over TCP connections, and +should not be confused with a listener object created using the +nng_tls(7) transport. +
    +
    +
    + + + + + +
    + + +Most NNG applications should not use this, but instead use the +nng_tls(7) transport instead. +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_tls_listener_accept.3tls.html b/man/tip/nng_tls_listener_accept.3tls.html new file mode 100644 index 00000000..12a3909e --- /dev/null +++ b/man/tip/nng_tls_listener_accept.3tls.html @@ -0,0 +1,642 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_tls_listener_accept(3tls) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/tls/tls.h>
    +
    +void nng_tls_listener_accept(nng_tls_listener *l, nng_aio *aio);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_tls_listener_accept() attempts to accept an incoming TLS connection +from a remote peer, using the listener l. +The operation is completed asynchronously, using aio.

    +
    +
    +

    This operation can only be done after the listener is already bound to +a TCP port and is listening.

    +
    +
    +

    If a connection is successfully established, the aio will have the +resulting nng_tls stored as its first output. +(See nng_aio_get_output().)

    +
    +
    +

    The address of the remote peer can be determined using the +NNG_OPT_REMADDR option with the +nng_tls_getopt() function on the +returned nng_tls.

    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    None.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    +NNG_ECANCELED + +

    The operation was aborted.

    +
    +NNG_ECLOSED + +

    The listener is closed.

    +
    +NNG_ECONNRESET + +

    The connection was reset by the peer.

    +
    +NNG_ENOMEM + +

    Insufficient free memory exists.

    +
    +NNG_ESTATE + +

    The listener is not not listening.

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

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/tls/tls.h>
    +
    +int nng_tls_listener_alloc(nng_tls_listener *lp);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_tls_listener_alloc() allocates a TLS listener, which can be used +to accept incoming connections over TLS, and stores a pointer to it +it in the location referenced by lp.

    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

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

    +
    +
    +
    +
    +

    ERRORS

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

    Insufficient free memory exists.

    +
    +NNG_ENOTSUP + +

    TLS support not configured in library.

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_tls_listener_close.3tls.html b/man/tip/nng_tls_listener_close.3tls.html new file mode 100644 index 00000000..8a12da29 --- /dev/null +++ b/man/tip/nng_tls_listener_close.3tls.html @@ -0,0 +1,603 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_tls_listener_close(3tls) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/tls/tls.h>
    +
    +void nng_tls_listener_close(nng_tls_listener *l);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_tls_listener_close() function closes the supplied TLS listener l, +but does not free the underlying resources associated with it.

    +
    +
    +

    If any accept operations using l +are in progress, they will be terminated with an NNG_ECLOSED error condition.

    +
    +
    +

    Furthermore any future accesses to the listener l will also result in +NNG_ECLOSED.

    +
    +
    + + + + + +
    + + +This function does not release the memory for the listener, so the +application should still free the memory using +nng_tls_listener_free() +once it is certain that nothing else is using it. +
    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    None.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    +

    None.

    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_tls_listener_free.3tls.html b/man/tip/nng_tls_listener_free.3tls.html new file mode 100644 index 00000000..4efd7b28 --- /dev/null +++ b/man/tip/nng_tls_listener_free.3tls.html @@ -0,0 +1,596 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_tls_listener_free(3tls) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/tls/tls.h>
    +
    +void nng_tls_listener_free(nng_tls_listener *l);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_tls_listener_free() function closes the supplied TLS listener l, +and frees the underlying resources associated with it.

    +
    +
    +

    If any accept operations using l +are in progress, they will be terminated with an NNG_ECLOSED error condition.

    +
    +
    + + + + + +
    + + +It is important that the application ensure that no further accesses +are made to l, as the memory backing it will be reclaimed for other uses. +
    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    None.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    +

    None.

    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_tls_listener_getopt.3tls.html b/man/tip/nng_tls_listener_getopt.3tls.html new file mode 100644 index 00000000..1a619f9c --- /dev/null +++ b/man/tip/nng_tls_listener_getopt.3tls.html @@ -0,0 +1,650 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_tls_listener_getopt(3tls) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/tls/tls.h>
    +
    +int nng_tls_listener_getopt(nng_tls_listener *l, const char *name, void *data, size_t *sizep);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_tls_listener_getopt() is used to retrieve the value of the option +name for the TLS listener l. +The size of the buffer located at data to receive the copy is passed by the +caller at the location referenced by sizep. +If this size is sufficient to hold the entire object, the object is copied into +the buffer specified by data. +In either event, the size of the source object (the amount of data copied, +or that would have been copied if sufficient space were available) is stored +at the location of sizep.

    +
    +
    +

    Options

    +
    +

    The options specifically suppported for retrieval from TLS listeners are:

    +
    + +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

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

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    + + + + + + + + + + + + + + + + + +
    +NNG_ECLOSED + +

    The dialer is closed.

    +
    +NNG_EINVAL + +

    There was insufficient space to receive the object. +The amount of data actually needed is returned in sizep.

    +
    +NNG_ENOTSUP + +

    The option name is not supported.

    +
    +NNG_EWRITEONLY + +

    The option name may not read.

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_tls_listener_listen.3tls.html b/man/tip/nng_tls_listener_listen.3tls.html new file mode 100644 index 00000000..cdd2b769 --- /dev/null +++ b/man/tip/nng_tls_listener_listen.3tls.html @@ -0,0 +1,646 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_tls_listener_listen(3tls) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/tls/tls.h>
    +
    +int nng_tls_listener_listen(nng_tls_listener l, const nng_sockaddr *sa);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_tls_listener_listen() attempts to bind the listener l +to the local address specified by sa, which must be in the +NNG_AF_INET or NNG_AF_INET6 address family.

    +
    +
    +

    This also sets the underlying port into passive mode, ready to +accept an incoming connection, and established a listen queue +for receiving incoming connections. (The queue depth is system +specific, but typically 128.)

    +
    +
    +

    The actual IPv4 or IPv6 address in sa may refer either to a locally +configured interface address, or to a zero-valued adddress to indicate +that all interfaces on the system should be bound.

    +
    +
    +

    The TCP port number may also be zero. In this case the system will +choose a free TCP port at random, and use it.

    +
    +
    +

    The chosen port number may be retrieved using the +NNG_OPT_LOCADDR option with the +nng_tls_listener_getopt() function.

    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

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

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    +NNG_EADDRINUSE + +

    The address specified by sa is already in use.

    +
    +NNG_EADDRINVAL + +

    The address specified by sa is invalid or unavailable.

    +
    +NNG_ECLOSED + +

    The listener l has been closed.

    +
    +NNG_ECRYPTO + +

    Cryptographic or certificate error.

    +
    +NNG_ESTATE + +

    The listener l is already bound.

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_tls_listener_setopt.3tls.html b/man/tip/nng_tls_listener_setopt.3tls.html new file mode 100644 index 00000000..73243aed --- /dev/null +++ b/man/tip/nng_tls_listener_setopt.3tls.html @@ -0,0 +1,652 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_tls_listener_setopt(3tls) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/tls/tls.h>
    +
    +int nng_tls_listener_setopt(nng_tls_listener *l, const char *name, const void *data, size_t size);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_tls_listener_setopt() is used to set the option name for the +TLS listener l. +The value to set is copied from data, which should be size bytes +in length.

    +
    +
    +

    Options

    +
    +

    The options specifically suppported for modification on TLS listeners are:

    +
    + +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

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

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    + + + + + + + + + + + + + + + + + +
    +NNG_ECLOSED + +

    The listener is closed.

    +
    +NNG_EINVAL + +

    Either data or size are invalid.

    +
    +NNG_ENOTSUP + +

    The option name is not supported.

    +
    +NNG_EREADONLY + +

    The option name may not be modified.

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_tls_options.5.html b/man/tip/nng_tls_options.5.html new file mode 100644 index 00000000..6797dd30 --- /dev/null +++ b/man/tip/nng_tls_options.5.html @@ -0,0 +1,691 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_tls_options(5) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +
    +#define NNG_OPT_TLS_AUTH_MODE     "tls-authmode"
    +#define NNG_OPT_TLS_CA_FILE       "tls-ca-file"
    +#define NNG_OPT_TLS_CERT_KEY_FILE "tls-cert-key-file"
    +#define NNG_OPT_TLS_CONFIG        "tls-config"
    +#define NNG_OPT_TLS_SERVER_NAME   "tls-server-name"
    +#define NNG_OPT_TLS_VERIFIED      "tls-verified"
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    This page documents the various standard options that can be set or +retrieved on objects using TLS in the nng library.

    +
    +
    +

    The option names should always be used by their symbolic definitions.

    +
    +
    +

    In the following list of options, the name of the option is supplied, +along with the data type of the underlying value.

    +
    +
    +

    Some options are only meaningful or supported in certain contexts, or may +have other access restrictions. +An attempt has been made to include details about such restrictions in the +description of the option.

    +
    +
    +

    TLS Options

    +
    +
    +
    NNG_OPT_TLS_AUTH_MODE
    +
    +

    (int) +Write-only option used to configure the authentication mode used. +See nng_tls_config_auth_mode() for +more details.

    +
    +
    NNG_OPT_TLS_CA_FILE
    +
    +

    (string) Write-only option naming a file containing certificates to +use for peer validation. +See nng_tls_config_ca_file() for more +information.

    +
    +
    NNG_OPT_TLS_CERT_KEY_FILE
    +
    +

    (string) Write-only option naming a file containing the local certificate and +associated private key. +The private key used must be unencrypted. +See nng_tls_config_own_cert() for more +information.

    +
    +
    NNG_OPT_TLS_CONFIG
    +
    +

    (nng_tls_config *) +This option references the underlying +TLS configuration object. +A hold is placed on the underlying +configuration object before returning it.

    +
    + + + + + +
    + + +The caller should release the hold with +nng_tls_config_free() when it no +longer needs the TLS configuration object. +
    +
    +
    + + + + + +
    + + +Use this option when more advanced TLS configuration is required. +
    +
    +
    +
    NNG_OPT_TLS_SERVER_NAME
    +
    +

    (string) +This write-only option is used to specify the name of the server. +When used with a dialer, this potentially configures SNI (server name +indication, which is used as a hint by a multihosting server to choose the +appropriate certificate to provide) and also is used to validate the +name presented in the server’s x509 certificate.

    +
    +
    NNG_OPT_TLS_VERIFIED
    +
    +

    (bool) +This read-only option indicates whether the remote peer has been properly verified using TLS +authentication. +May return incorrect results if peer authentication is disabled.

    +
    +
    +
    +
    +
    +

    Inherited Options

    +
    +

    Generally, the following option values are also available for TLS objects, +when appropriate for the context:

    +
    + +
    +
    +
    + +
    + + diff --git a/man/tip/nng_tls_recv.3tls.html b/man/tip/nng_tls_recv.3tls.html new file mode 100644 index 00000000..5ecbd612 --- /dev/null +++ b/man/tip/nng_tls_recv.3tls.html @@ -0,0 +1,668 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_tls_recv(3tls) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/tls/tls.h>
    +
    +void nng_tls_recv(nng_tls *conn, nng_aio *aio);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_tls_recv() function starts an asynchronous receive from the +TLS connection conn, into the scatter/gather vector located in the +asynchronous I/O structure aio.

    +
    +
    + + + + + +
    + + +The nng_aio_set_iov() function must have been +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 either be zero or an error code.

    +
    +
    +

    The I/O operation completes as soon as at least one byte has been +received, or an error has occurred. +Therefore, the number of bytes read may be less than requested. +The actual number of bytes read can be determined with +nng_aio_count().

    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    None.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +NNG_ECANCELED + +

    The operation was canceled.

    +
    +NNG_ECLOSED + +

    The connection was closed.

    +
    +NNG_ECRYPTO + +

    Cryptographic or certificate error.

    +
    +NNG_ECONNRESET + +

    The peer closed the connection.

    +
    +NNG_EINVAL + +

    The aio does not contain a valid scatter/gather vector.

    +
    +NNG_ENOMEM + +

    Insufficient free memory to perform the operation.

    +
    +NNG_ETIMEDOUT + +

    Timeout waiting for data from the connection.

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_tls_send.3tls.html b/man/tip/nng_tls_send.3tls.html new file mode 100644 index 00000000..abaf3e3a --- /dev/null +++ b/man/tip/nng_tls_send.3tls.html @@ -0,0 +1,667 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_tls_send(3tls) + + + + + + + +
    +
    +

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/tls/tls.h>
    +
    +void nng_tls_send(nng_tls *conn, nng_aio *aio);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_tls_send() function starts an asynchronous send over the +TLS connection conn from the scatter/gather vector located in the +asynchronous I/O structure aio.

    +
    +
    + + + + + +
    + + +The nng_aio_set_iov() function must have been +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 either be zero or an error code.

    +
    +
    +

    The I/O operation completes as soon as at least one byte has been +sent, or an error has occurred. +Therefore, the number of bytes sent may be less than requested. +The actual number of bytes sent can be determined with +nng_aio_count().

    +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

    None.

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +NNG_ECANCELED + +

    The operation was canceled.

    +
    +NNG_ECLOSED + +

    The connection was closed.

    +
    +NNG_ECONNRESET + +

    The peer closed the connection.

    +
    +NNG_ECRYPTO + +

    Cryptographic or certificate error.

    +
    +NNG_EINVAL + +

    The aio does not contain a valid scatter/gather vector.

    +
    +NNG_ENOMEM + +

    Insufficient free memory to perform the operation.

    +
    +NNG_ETIMEDOUT + +

    Timeout waiting for data from the connection.

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

    SYNOPSIS

    +
    +
    +
    +
    #include <nng/nng.h>
    +#include <nng/supplemental/tls/tls.h>
    +
    +int nng_tls_setopt(nng_tls *conn, const char *name, const void *data, size_t size);
    +
    +
    +
    +
    +
    +

    DESCRIPTION

    +
    +
    +

    The nng_tls_setopt() is used to set the option name for the +TLS connection conn. +The value to set is copied from data, which should be size bytes +in length.

    +
    +
    +

    Options

    +
    +

    The options specifically suppported for modification on TLS connections are:

    +
    + +
    +
    +
    +
    +

    RETURN VALUES

    +
    +
    +

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

    +
    +
    +
    +
    +

    ERRORS

    +
    +
    + + + + + + + + + + + + + + + + + +
    +NNG_ECLOSED + +

    The connection conn is closed.

    +
    +NNG_EINVAL + +

    Either data or size are invalid.

    +
    +NNG_ENOTSUP + +

    The option name is not supported.

    +
    +NNG_EREADONLY + +

    The option name may not be modified.

    +
    +
    +
    +
    + +
    + + diff --git a/man/tip/nng_ws.7.html b/man/tip/nng_ws.7.html index 813fadaf..13af5508 100644 --- a/man/tip/nng_ws.7.html +++ b/man/tip/nng_ws.7.html @@ -562,12 +562,12 @@ Both IPv4 and IPv6 are supported when the underlying platform also supports it.<

    Registration

    Depending upon how the library was built, it may be necessary to -register the transport by calling nng_ws_register().

    +register the transport by calling nng_ws_register().

    If TLS support is enabled in the library, secure WebSockets (over TLS v1.2) can be used as well, but the secure transport may have to be registered using -the nng_wss_register() function.

    +the nng_wss_register() function.

    @@ -621,10 +621,10 @@ permitted, with IPv4 addresses mapped to IPv6 addresses.)

    Socket Address

    -

    When using an nng_sockaddr structure, +

    When using an nng_sockaddr structure, the actual structure is either of type -nng_sockaddr_in (for IPv4) or -nng_sockaddr_in6 (for IPv6).

    +nng_sockaddr_in (for IPv4) or +nng_sockaddr_in6 (for IPv6).

    @@ -696,7 +696,7 @@ configuration object for wss:// endpoints. A hold is placed on the underlying configuration object before returning it. The caller should release the object with -nng_tls_config_free() when it no +nng_tls_config_free() when it no longer needs the TLS configuration.

    @@ -719,7 +719,7 @@ Use this option when advanced TLS configuration is required.

    (string) Write-only option naming a file containing certificates to use for peer validation. -See nng_tls_config_ca_file() for more +See nng_tls_config_ca_file() for more information.

    NNG_OPT_TLS_CERT_KEY_FILE
    @@ -727,13 +727,13 @@ information.

    (string) Write-only option naming a file containing the local certificate and associated private key. The private key used must be unencrypted. -See nng_tls_config_own_cert() for more +See nng_tls_config_own_cert() for more information.

    NNG_OPT_TLS_AUTH_MODE

    (int) Write-only option used to configure the authentication mode used. -See nng_tls_config_auth_mode() for +See nng_tls_config_auth_mode() for more details.

    NNG_OPT_TLS_VERIFIED
    -- cgit v1.2.3-70-g09d2