#include <nng/nng.h> typedef struct nng_socket_s nng_socket;
|This documentation is for the TIP (development tree) of NNG and may represent unreleased changes or functionality that is experimental, and is subject to change before release. The latest released version is v1.3.2. See the documentation for v1.3.2 for the most up-to-date information.|
nng_socket - socket handle
nng_socket is a handle to an underlying socket object.
All communication between the application and remote Scalability Protocol
peers is done through sockets.
A given socket can have multiple dialers (
and/or listeners (
nng_listener), and multiple
may be connected to multiple transports at the same time.
However, a given socket will have exactly one protocol associated with it,
and is responsible for any state machines or other protocol-specific logic.
A socket may be initialized using the macro
before it is opened, to prevent confusion with valid open sockets.
nng_socket s = NNG_SOCKET_INITIALIZER;