From ec0f96f5b7ed7888256f3783dd5ff64e5b5a8c42 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 1 Mar 2020 12:50:29 -0800 Subject: Publishing updates for v1.3.0 --- man/v1.3.0/nng_socket.5.html | 451 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 451 insertions(+) create mode 100644 man/v1.3.0/nng_socket.5.html (limited to 'man/v1.3.0/nng_socket.5.html') diff --git a/man/v1.3.0/nng_socket.5.html b/man/v1.3.0/nng_socket.5.html new file mode 100644 index 00000000..aa1bc10b --- /dev/null +++ b/man/v1.3.0/nng_socket.5.html @@ -0,0 +1,451 @@ +--- +version: v1.3.0 +layout: manpage +title: nng_socket(5) +--- + +
+{% if page.version and page.version != site.latest %} +{% if page.version == "tip" %} +{% include manpage-tip.html %} +{% else %} +{% include manpage-old.html %} +{% endif %} +{% endif %} + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+typedef struct nng_socket_s 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 listeners (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.

+
+
+ + + + + +
+ + +The nng_socket structure is always passed by value (both +for input parameters and return values), and should be treated opaquely. +Passing structures this way gives the compiler a chance to perform +accurate type checks in functions passing values of this type. +
+
+
+

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().

+
+
+

Initialization

+
+

A socket may be initialized using the macro NNG_SOCKET_INITIALIZER +before it is opened, to prevent confusion with valid open sockets.

+
+
+

For example:

+
+
+
+
nng_socket s = NNG_SOCKET_INITIALIZER;
+
+
+
+
+
+ +
+
-- cgit v1.2.3-70-g09d2