From d33e3db3e59c046aac8a9b81ae42f4223b526ad5 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 9 Mar 2018 18:44:17 -0800 Subject: man page updates for tip --- man/tip/index.html | 12 + man/tip/libnng.html | 12 + man/tip/nng_msg_get_pipe.html | 596 +++++++++++++++++++++++++++++++++++++ man/tip/nng_msg_set_pipe.html | 588 ++++++++++++++++++++++++++++++++++++ man/tip/nng_pipe_getopt.html | 670 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 1878 insertions(+) create mode 100644 man/tip/nng_msg_get_pipe.html create mode 100644 man/tip/nng_msg_set_pipe.html create mode 100644 man/tip/nng_pipe_getopt.html (limited to 'man') diff --git a/man/tip/index.html b/man/tip/index.html index 511bb6f5..12feca78 100644 --- a/man/tip/index.html +++ b/man/tip/index.html @@ -869,6 +869,14 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

free a message

+

nng_msg_get_pipe(3)

+

set pipe for message

+ + +

nng_msg_get_pipe(3)

+

set pipe for message

+ +

nng_msg_header(3)

return message header

@@ -909,6 +917,10 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

remove data from start of message body

+

nng_pipe_getopt(3)

+

get pipe option

+ +

nng_recv(3)

recv data

diff --git a/man/tip/libnng.html b/man/tip/libnng.html index 5603c5f4..073a2d90 100644 --- a/man/tip/libnng.html +++ b/man/tip/libnng.html @@ -681,6 +681,10 @@ Listeners accept incoming connection requets, and dialers make them.

nng_listener_start(3)

start listener

+ +

nng_pipe_getopt(3)

+

get pipe option

+ @@ -731,6 +735,10 @@ Most applications will only interact with the body.

free a message

+

nng_msg_get_pipe(3)

+

get pipe for message

+ +

nng_msg_insert(3)

prepend to message body

@@ -743,6 +751,10 @@ Most applications will only interact with the body.

reallocate a message

+

nng_msg_set_pipe(3)

+

set pipe for message

+ +

nng_msg_trim(3)

remove data from start of message body

diff --git a/man/tip/nng_msg_get_pipe.html b/man/tip/nng_msg_get_pipe.html new file mode 100644 index 00000000..a8e2d913 --- /dev/null +++ b/man/tip/nng_msg_get_pipe.html @@ -0,0 +1,596 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_msg_get_pipe(3) + + + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+nng_pipe nng_msg_get_pipe(nng_msg *msg);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_msg_get_pipe() returns the pipe associated with message msg. +On receive, this is the pipe from which a message was received. +On transmit, this would be the pipe that the message should be delivered +to, if a specific peer is required.

+
+
+ + + + + +
+ + +Not all protocols support overriding the destination pipe. +
+
+
+

The most usual use case for this is to obtain information about the peer +from which the message was received. This can be used to provide different +behaviors for different peers, such as a higher level of authentication +for peers located on an untrusted network. +The nng_pipe_getopt(3) function is useful in this situation.

+
+
+
+
+

RETURN VALUES

+
+
+

This function returns the pipe associated with this message, which will +be a positive value. If the pipe is non-positive, then that indicates that +no specific pipe is associated with the messsage.

+
+
+
+
+

ERRORS

+
+
+

None.

+
+
+
+ +
+ + diff --git a/man/tip/nng_msg_set_pipe.html b/man/tip/nng_msg_set_pipe.html new file mode 100644 index 00000000..d331528e --- /dev/null +++ b/man/tip/nng_msg_set_pipe.html @@ -0,0 +1,588 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_msg_get_pipe(3) + + + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+void nng_msg_set_pipe(nng_msg *msg, nng_pipe p);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_msg_set_pipe() sets the pipe associated with message m to p. +This is most often useful when used with protocols that support directing +a message to a specific peer. For example the nng_pair(7) version +1 protocol can do this when NNG_OPT__POLYAMOROUS mode is set.

+
+
+ + + + + +
+ + +Not all protocols support overriding the destination pipe. +
+
+
+
+
+

RETURN VALUES

+
+
+

None.

+
+
+
+
+

ERRORS

+
+
+

None.

+
+
+
+ +
+ + diff --git a/man/tip/nng_pipe_getopt.html b/man/tip/nng_pipe_getopt.html new file mode 100644 index 00000000..3b48d672 --- /dev/null +++ b/man/tip/nng_pipe_getopt.html @@ -0,0 +1,670 @@ +--- +version: tip +layout: refman +--- + + + + + + + +nng_pipe_getopt(3) + + + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+int nng_pipe_getopt(nng_pipe p, const char *opt, void *val, size_t *valszp);
+int nng_pipe_getopt_int(nng_pipe p, const char *opt, int *ivalp);
+int nng_pipe_getopt_ms(nng_pipe p, const char *opt, nng_duration *durp);
+int nng_pipe_getopt_size(nng_pipe p, const char *opt, size_t *zp);
+int nng_pipe_getopt_uint64(nng_pipe p, const char *opt, uint64_t *u64p);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_pipe_getopt() functions are used to retrieve option values for +the pipe p. The actual options that may be retrieved in this way +vary, and are documented in the nng_getopt(3) manual. +Additionally some transport-specific options are documented with the +transports themselves, and some protocol-specific options are documented +with the protocol.

+
+
+ + + + + +
+ + +All "options" on a pipe are read-only values, and intended to +facilitate understanding the identity of an associated peer; modification +of options must be done on the listener or dialer using either +nng_listener_setopt(3) or +nng_dialer_getopt(3) +
+
+
+

Any option that is set on an endpoint will be retrievable from pipes +created by that endpoint.

+
+
+

In all of these forms, the option opt is retrieved from the pipe p.

+
+
+

The details of the type, size, and semantics of the option will depend +on the actual option, and will be documented with the option itself.

+
+
+

The first form of this function, nng_pipe_getopt(), can be used to +retrieve the value of any option. It is untyped. The caller must store +a pointer to a buffer to receive the value in val, and the size of the +buffer shall be stored at the location referenced by valszp.

+
+
+

When the function returns, the actual size of the data copied (or that +would have been copied if sufficient space were present) is stored at +the location referened by valszp. If the caller’s buffer is not large +enough to hold the entire object, then the copy is truncated. Therefore +the caller should validate that the returned size in valszp does not +exceed the original buffer size to check for truncation.

+
+
+

It is acceptable to pass NULL for val if the value in valszp is zero. +This can be used to determine the size of the buffer needed to receive +the object.

+
+
+

Generally, it will be easier to use one of the typed forms instead. Note +however that no validation that the option is actually of the associated +type is performed, so the caller must take care to use the correct typed +form.

+
+
+

The second form, nng_pipe_getopt_int(), +is for options which take an integer (or boolean). The value will +be stored at ivalp. For booleans the value will be eiher 0 (false) or 1 (true).

+
+
+

The third form, nng_pipe_getopt_ms(), is used to retrieve time durations +(such as timeouts), stored in durp as a number of milliseconds. +(The special value NNG_DUR_INFINITE means an infinite amount of time, and +the special value NNG_DUR_DEFAULT means a context-specific default.)

+
+
+

The fourth form, nng_pipe_getopt_size(), is used to retrieve a size +into the pointer zp, typically for buffer sizes, message maximum sizes, and +similar options.

+
+
+

The fifth form, nng_pipe_getopt_uint64(), is used to retrieve a +64-bit unsigned value into the value referenced by u64p. +This is typically used for options +related to identifiers, network numbers, and similar.

+
+
+
+
+

RETURN VALUES

+
+
+

This function returns 0 on success, and non-zero otherwise.

+
+
+
+
+

ERRORS

+
+
+
+
NNG_ECLOSED
+
+

Parameter p does not refer to an open pipe.

+
+
NNG_ENOTSUP
+
+

The option opt is not supported.

+
+
NNG_EWRITEONLY
+
+

The option opt is write-only.

+
+
+
+
+
+ +
+ + -- cgit v1.2.3-70-g09d2