--- version: tip layout: manpage_v2 ---

NNG Reference Manual

Section 1: Commands and Utilities

This section documents utilities and programs that are included with the distribution.

Section 3: Library Functions

This section documents core libary functions supporting Scalability Protocols.

Most Scalability Protocols applications can be written using just the functions documented in this section, as this represents the primary API for building such applications.

Section 3compat: Compatible Library Functions

This section documents the nanomsg 1.0 libary compatible functions.

These functions are provided as a transition aid, for application developers coming to NNG from libnanomsg, and are discouraged from use in new applications.

While this is discouraged for long term use, as a transition aid applications may use the value returned by the nng_socket_id() in these functions just like a socket descriptor (as if the socket were opened via nn_socket()). This sort of API intermixing should only be used during transition from the legacy API to the new API.

Section 3http: Supplemental HTTP Functions

This section documents supplemental HTTP (HyperText Transport Protocol) support functions that are available.

These functions can be used in conjunction with the WebSocket transport for Scalability Protocols, or they may be used to construct other types of applications that communicate using HTTP.

It is also possible to combine the two, such that an HTTP server providing static or dynamic content can also be used to host one or more Scalability Protocols sockets.

At present NNG only supports HTTP/1.0 and HTTP/1.1.

Section 3str: Supplemental TCP Functions

This section documents supplemental byte stream functions that are available.

These functions are made available to facilitate using raw byte stream connections with the NNG asynchronous I/O API. These byte streams may be useful for applications that need to communicate with raw TCP/IP or IPC streams instead of Scalability Protocols.

Section 3supp: Supplemental Functions

This section documents supplemental functions that are available. These functions are not intrinsic to building Scalability Protocols applications with this library.

However, their use may facilitate writing portable applications by providing uniform functions for common application needs such as mutual exclusion locks, threading, time keeping, and similar needs.

Section 3tls: Supplemental TLS Functions

This section documents supplemental TLS (Transport Layer Security) functions that are available. TLS support is available when using Scalability Protocols with the TLS transport, or when using WebSocket, either with the WebSocket transport for Scalability Protocols, or combined with other HTTP capabilities.

These functions depend on library support that is not included directly with NNG however, so their presence will depend on whether this additional support was present and enabled with libnng was built.

Currently, this extra support can be provided by the mbedTLS library or by external plug-ins.

Contact Staysail Systems, Inc. for details about commercially available options, including support for FIPS 140-2 validated cryptography and TLS v1.3.

Section 5: Macros and Types

This section documents core macros and types that are available.

These are the core types and macros that most Scalabilty Protocols applications need will use.

Section 7: Protocols and Transports

This sections documents various protocols and transports that are available in the distribution.

Protocols implement communication patterns, such as request/reply, publish/subscribe, and so forth. A given socket is created with exactly one protocol, and that protocol defines the key behavior of the socket.

Conversely, transports are the underlying mechansims by which messages are moved between participants, such as TCP/IP or UNIX domain IPC. A given socket may be using several transports at the same time.