From 732e79d37c9336e8ff1962e0dffab969ca7d915e Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 30 Oct 2017 17:26:41 -0700 Subject: man page updates for 0.0.0 --- man/v0.0.0/libnng.html | 808 +++++++++++++++++++++++++++++++++++++++++++ man/v0.0.0/nng.html | 64 +++- man/v0.0.0/nng_close.html | 4 +- man/v0.0.0/nng_inproc.html | 2 +- man/v0.0.0/nng_pub.html | 4 +- man/v0.0.0/nng_strerror.html | 609 ++++++++++++++++++++++++++++++++ man/v0.0.0/nng_sub.html | 4 +- 7 files changed, 1483 insertions(+), 12 deletions(-) create mode 100644 man/v0.0.0/libnng.html create mode 100644 man/v0.0.0/nng_strerror.html diff --git a/man/v0.0.0/libnng.html b/man/v0.0.0/libnng.html new file mode 100644 index 00000000..78b6cee2 --- /dev/null +++ b/man/v0.0.0/libnng.html @@ -0,0 +1,808 @@ +--- +version: 0.0.0\nlayout: default +--- + + + + + + + + +libnng(3) + + + + + + +
+
+

SYNOPSIS

+
+
+

cc [flags] files -lnng [libraries]

+
+
+
+
+

DESCRIPTION

+
+
+

The nng(7) library provides a common messaging framework +intended to solve common communication problems in distributed applications.

+
+
+

It provides a C language API.

+
+
+

Common Functions

+
+

The following common functions exist in libnng.

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

nng_alloc(3)

allocate memory

nng_dial(3)

create and start a dialer

nng_free(3)

free memory

nng_strerror(3)

return an error description

+
+
+

Socket Functions

+
+

The following functions operate on sockets.

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

nng_close(3)

close a socket

nng_closeall(3)

close all open sockets

nng_dial(3)

create and start a dialer

nng_getopt(3)

get a socket option

nng_listen(3)

create and start a listener

nng_protocol(3)

return the protocol number for socket

nng_peer(3)

return peer protocol number for socket

nng_recv(3)

receive data

nng_send(3)

send data

nng_setopt(3)

set a socket option

+
+
+

Message Functions

+
+

Applications desiring to use the richest part of libnng will want to +use the message API, where a message structure is passed between functions. +This API provides the most power support for zero-copy.

+
+
+

Messages are divided into a header and body, where the body generally carries +user-payload and the header carries protocol specific header information. +Most applications will only interact with the body.

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

nng_msg_alloc(3)

allocate a message

nng_msg_body(3)

return the message body

nng_msg_free(3)

free a message

nng_msg_header(3)

return the message header

nng_msg_header_len(3)

return the message header length

nng_msg_len(3)

return the message body length

nng_msg_free(3)

reallocate a message

nng_recvmsg(3)

receive a message

nng_sendmsg(3)

send a message

+
+
+

Asynchronous Operations

+
+

Most applications will interact with nng synchronously; that is that +functions such as nng_send() will block the calling +thread until the operation has completed.

+
+
+ + + + + +
+ + +Synchronous operations which send messages may return before the +message has actually been received, or even transmitted. Instead, These +functions return as soon as the message was successfully queued for +delivery. +
+
+
+

Asynchronous operations behave differently. These operations are +initiated by the calling thread, but control returns immediately to +the calling thread. When the operation is subsequently completed (regardless +of whether this was successful or not), then a user supplied function +("callback") is executed.

+
+
+

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

+
+
+

The following functions are used in the asynchronous model:

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

nng_aio_alloc(3)

allocate asynchronous I/O context

nng_aio_cancel(3)

cancel asynchronous I/O operation

nng_aio_free(3)

free asynchronous I/O context

nng_aio_get_msg(3)

get message from an asynchronous receive

nng_aio_result(3)

return result from asynchronous operation

nng_aio_stop(3)

stop asynchronous I/O operation

nng_aio_wait(3)

wait for an asynchronous I/O operation

nng_aio_set_msg(3)

set message for an asynchronous send

nng_aio_set_timeout(3)

set timeout for an asynchronous send

nng_recv_aio(3)

receive a message asynchronously

nng_send_aio(3)

send a message asynchronously

+
+
+

Protocols

+
+

The following functions are used to construct a socket with a specific +protocol:

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

nng_bus_open(3)

open a bus socket

nng_pair_open(3)

open a pair socket

nng_pub_open(3)

open a pub socket

nng_rep_open(3)

open a rep socket

nng_req_open(3)

open a req socket

nng_respondent_open(3)

open a respondent socket

nng_sub_open(3)

open a sub socket

nng_surveyor_open(3)

open a surveyor socket

+
+
+

Transports

+
+

The following functions are used to register a transport for use.

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

nng_inproc_register(3)

register inproc transport

nng_ipc_register(3)

register IPC transport

nng_tcp_register(3)

register TCP transport

nng_zerotier_register(3)

register ZeroTier transport

+
+
+
+
+

AUTHORS

+ +
+
+

SEE ALSO

+ +
+
+ +
+
+

Copyright 2017 Garrett D’Amore
+Copyright 2017 Capitar IT Group BV

+
+
+

This document is supplied under the terms of the +MIT License.

+
+
+
+
+ + + diff --git a/man/v0.0.0/nng.html b/man/v0.0.0/nng.html index 9fafee90..3f3f302e 100644 --- a/man/v0.0.0/nng.html +++ b/man/v0.0.0/nng.html @@ -8,7 +8,6 @@ version: 0.0.0\nlayout: default - nng(7) @@ -429,6 +428,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b .hide-for-print{display:none!important} .show-for-print{display:inherit!important}} + @@ -540,6 +537,63 @@ other languages please check the website.

+
+

Conceptual Overview

+
+

nng presents a socket view of networking. The sockets are constructed +using protocol-specific functions, as a given socket implements precisely +one nng protocol.

+
+
+

Each socket can be used to send and receive messages (if the protocol) +supports it, and implements the appropriate protocol semantics. For +example, nng_sub(7) sockets automatically filter incoming +messages to discard those for topics that have not been subscribed.

+
+
+

nng sockets are message oriented, so that messages are either delivered +wholly, or not at all. Partial delivery is not possible. Furthermore, +nng does not provide any other delivery or ordering guarantees; +messages may be dropped or reordered. (Some protocols, such as +nng_req(7) may offer stronger guarantees by +performing their own retry and validation schemes.)

+
+
+

Each socket can have zero, one, or many "endpoints", which are either +listeners or dialers. (A given socket may freely choose whether it uses +listeners, dialers, or both.) These "endpoints" provide access to +underlying transports, such as TCP, etc.

+
+
+

Each endpoint is associated with a URL, which is a service address. For +dialers, this will be the service address that will be contacted, whereas +for listeners this is where the listener will bind and watch for new +connections.

+
+
+

Endpoints do not themselves transport data. They are instead responsible +for the creation of pipes, which can be thought of as message-oriented, +connected, streams. Pipes frequently correspond to a single underlying +byte stream — for example both IPC and TCP transports implement their +pipes using a 1:1 relationship with a connected socket.

+
+
+

Endpoints create pipes as needed. Listeners will create them when a new +client connection request arrives, and dialers will generally create one, +then wait for it to disconnect before reconnecting.

+
+
+

Most applications should not have to worry about endpoints or pipes at +all; the socket abstraction should provide all the functionality needed +other than in a few specific circumstances.

+
+
+
+

API

+
+

The library API is documented at libnng(3).

+
+
@@ -575,7 +629,7 @@ Copyright 2017 Capitar IT Group BV

diff --git a/man/v0.0.0/nng_close.html b/man/v0.0.0/nng_close.html index 866a5f8f..30071f50 100644 --- a/man/v0.0.0/nng_close.html +++ b/man/v0.0.0/nng_close.html @@ -517,7 +517,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
#include <nng/nng.h>
 
-int nng_close (int s);
+int nng_close(int s);
@@ -594,7 +594,7 @@ Copyright 2017 Capitar IT Group BV

diff --git a/man/v0.0.0/nng_inproc.html b/man/v0.0.0/nng_inproc.html index 55cf983b..1e56c728 100644 --- a/man/v0.0.0/nng_inproc.html +++ b/man/v0.0.0/nng_inproc.html @@ -623,7 +623,7 @@ Copyright 2017 Capitar IT Group BV

diff --git a/man/v0.0.0/nng_pub.html b/man/v0.0.0/nng_pub.html index 40660b53..87aba9b4 100644 --- a/man/v0.0.0/nng_pub.html +++ b/man/v0.0.0/nng_pub.html @@ -521,7 +521,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b #define NNG_PROTO_PUB NNG_PROTO_PUB_V0 int nng_pub_open(nng_socket *s); -int nng_pub0_open (nng_socket *s); +int nng_pub0_open(nng_socket *s); @@ -622,7 +622,7 @@ Copyright 2017 Capitar IT Group BV

diff --git a/man/v0.0.0/nng_strerror.html b/man/v0.0.0/nng_strerror.html new file mode 100644 index 00000000..5e6d4b6e --- /dev/null +++ b/man/v0.0.0/nng_strerror.html @@ -0,0 +1,609 @@ +--- +version: 0.0.0\nlayout: default +--- + + + + + + + + +nng_strerror(3) + + + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+const char * nng_strerror(int err);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_strerror() returns the human-readable description of the +given nng error in err.

+
+
+ + + + + +
+ + +The returned error message is provided in US English, but in the +future locale-specific strings may be presented instead. +
+
+
+ + + + + +
+ + +The specific strings associated with specific error messages are +subject to change. Therefore applications must not depend on the message, +but may use them verbatim when supplying information to end-users, such +as in diagnostic messages or log entries. +
+
+
+
+
+

RETURN VALUES

+
+
+

This function returns the human-readable error message, terminated +by a NUL byte.

+
+
+
+
+

AUTHORS

+ +
+
+

SEE ALSO

+
+ +
+
+
+ +
+
+

Copyright 2017 Garrett D’Amore
+Copyright 2017 Capitar IT Group BV

+
+
+

This document is supplied under the terms of the +MIT License.

+
+
+
+
+ + + diff --git a/man/v0.0.0/nng_sub.html b/man/v0.0.0/nng_sub.html index ef13aa43..283f3917 100644 --- a/man/v0.0.0/nng_sub.html +++ b/man/v0.0.0/nng_sub.html @@ -521,7 +521,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b #define NNG_PROTO_SUB NNG_PROTO_SUB_V0 int nng_sub_open(nng_socket *s); -int nng_sub0_open (nng_socket *s); +int nng_sub0_open(nng_socket *s); @@ -653,7 +653,7 @@ Copyright 2017 Capitar IT Group BV

-- cgit v1.2.3-70-g09d2