nanomsg next generation NNG  
Home GitHub Documentation

This documentation is for version 0.7.0 of nng, but the latest released version is v1.8.0. see the documentation for v1.8.0 for the most up-to-date information.
nng_socket(5)

SYNOPSIS

#include <nng/nng.h>

typedef uint32_t nng_socket;

DESCRIPTION

An 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 (nng_dialer) and/or (nng_listener), and multiple pipes (nng_pipe), and 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.

Although nng_socket is an integer data type, these objects are not ordinary file descriptors, and can only be used with the functions that explicitly indicate that it safe and appropropate to do so.

Each nng_socket is created by a protocol-specific constructor, such as nng_rep_open(). When the socket is no longer needed, it can be closed with nng_close().

NNG Reference Manual v0.7.0 © 2019 Staysail Systems, Inc, © 2018 Capitar IT Group BV
This document is supplied under the MIT License.
nanomsg™ and nng™ are trademarks of Garrett D'Amore.