diff options
Diffstat (limited to 'docs/man')
| -rw-r--r-- | docs/man/nng_msg_append.3.adoc | 14 | ||||
| -rw-r--r-- | docs/man/nng_msg_chop.3.adoc | 12 | ||||
| -rw-r--r-- | docs/man/nng_msg_header_append.3.adoc | 15 | ||||
| -rw-r--r-- | docs/man/nng_msg_header_chop.3.adoc | 12 | ||||
| -rw-r--r-- | docs/man/nng_msg_header_insert.3.adoc | 16 | ||||
| -rw-r--r-- | docs/man/nng_msg_header_trim.3.adoc | 10 | ||||
| -rw-r--r-- | docs/man/nng_msg_insert.3.adoc | 15 | ||||
| -rw-r--r-- | docs/man/nng_msg_trim.3.adoc | 12 |
8 files changed, 60 insertions, 46 deletions
diff --git a/docs/man/nng_msg_append.3.adoc b/docs/man/nng_msg_append.3.adoc index 7bceb223..fc87e15d 100644 --- a/docs/man/nng_msg_append.3.adoc +++ b/docs/man/nng_msg_append.3.adoc @@ -11,7 +11,7 @@ == NAME -nng_msg_append, nng_msg_append_u32 - append to message body +nng_msg_append - append to message body == SYNOPSIS @@ -20,20 +20,22 @@ nng_msg_append, nng_msg_append_u32 - append to message body #include <nng/nng.h> int nng_msg_append(nng_msg *msg, const void *val, size_t size); - +int nng_msg_append_u16(nng_msg *msg, uint16_t val16); int nng_msg_append_u32(nng_msg *msg, uint32_t val32); +int nng_msg_append_u64(nng_msg *msg, uint64_t val64); ---- == DESCRIPTION -The `nng_msg_append()` and `nng_msg_append_u32()` functions append data to +The `nng_msg_append()` family of functions appends data to the end of the body of message _msg_, reallocating it if necessary. -The first function appends _size_ bytes, copying them from _val_. The -second function appends the value _val32_ in network-byte order (big-endian). +The first function appends _size_ bytes, copying them from _val_. +The remaining functions append the value specified (such as _val32_) in +network-byte order (big-endian). == RETURN VALUES -This function returns 0 on success, and non-zero otherwise. +These functions return 0 on success, and non-zero otherwise. == ERRORS diff --git a/docs/man/nng_msg_chop.3.adoc b/docs/man/nng_msg_chop.3.adoc index 44f15ac6..1ecde435 100644 --- a/docs/man/nng_msg_chop.3.adoc +++ b/docs/man/nng_msg_chop.3.adoc @@ -11,7 +11,7 @@ == NAME -nng_msg_chop, nng_msg_chop_u32 - remove data from end of message body +nng_msg_chop - remove data from end of message body == SYNOPSIS @@ -20,21 +20,23 @@ nng_msg_chop, nng_msg_chop_u32 - remove data from end of message body #include <nng/nng.h> int nng_msg_chop(nng_msg *msg, size_t size); - +int nng_msg_chop_u16(nng_msg *msg, uint16_t *val16); int nng_msg_chop_u32(nng_msg *msg, uint32_t *val32); +int nng_msg_chop_u64(nng_msg *msg, uint64_t *val64); ---- == DESCRIPTION -The `nng_msg_chop()` and `nng_msg_chop_u32()` functions remove data from +The `nng_msg_chop()` family of functions removes data from the end of the body of message _msg_. The first function removes _size_ bytes. -The second function removes 4 bytes, and stores them in the value _val32_, +The remaining functions remove 2, 4, or 8 bytes, and stores them in the value +(such as _val32_), after converting them from network-byte order (big-endian) to native byte order. == RETURN VALUES -This function returns 0 on success, and non-zero otherwise. +These functions return 0 on success, and non-zero otherwise. == ERRORS diff --git a/docs/man/nng_msg_header_append.3.adoc b/docs/man/nng_msg_header_append.3.adoc index b711b9f6..08e48b74 100644 --- a/docs/man/nng_msg_header_append.3.adoc +++ b/docs/man/nng_msg_header_append.3.adoc @@ -11,7 +11,7 @@ == NAME -nng_msg_header_append, nng_msg_header_append_u32 - append to message header +nng_msg_header_append - append to message header == SYNOPSIS @@ -20,23 +20,24 @@ nng_msg_header_append, nng_msg_header_append_u32 - append to message header #include <nng/nng.h> int nng_msg_header_append(nng_msg *msg, const void *val, size_t size); - +int nng_msg_header_append_u16(nng_msg *msg, uint16_t val16); int nng_msg_header_append_u32(nng_msg *msg, uint32_t val32); +int nng_msg_header_append_u64(nng_msg *msg, uint64_t val64); ---- == DESCRIPTION -The `nng_msg_header_append()` and `nng_msg_header_append_u32()` -functions append data to +The `nng_msg_header_append()` family of functions appends data to the end of the headers of message _msg_, reallocating it if necessary. The first function appends _size_ bytes, copying them from _val_. -The second function appends the value _val32_ in network-byte order -(big-endian). + +The remaining functions append the value (such as _val32_) in +network-byte order (big-endian). == RETURN VALUES -This function returns 0 on success, and non-zero otherwise. +These functions return 0 on success, and non-zero otherwise. == ERRORS diff --git a/docs/man/nng_msg_header_chop.3.adoc b/docs/man/nng_msg_header_chop.3.adoc index 6536b6fb..c9c9113b 100644 --- a/docs/man/nng_msg_header_chop.3.adoc +++ b/docs/man/nng_msg_header_chop.3.adoc @@ -11,7 +11,7 @@ == NAME -nng_msg_header_chop, nng_msg_header_chop_u32 - remove data from end of message header +nng_msg_header_chop - remove data from end of message header == SYNOPSIS @@ -20,22 +20,24 @@ nng_msg_header_chop, nng_msg_header_chop_u32 - remove data from end of message h #include <nng/nng.h> int nng_msg_header_chop(nng_msg *msg, size_t size); - +int nng_msg_header_chop_u16(nng_msg *msg, uint16_t *val16); int nng_msg_header_chop_u32(nng_msg *msg, uint32_t *val32); +int nng_msg_header_chop_u64(nng_msg *msg, uint64_t *val64); ---- == DESCRIPTION -The `nng_msg_header_chop()` and `nng_msg_header_chop_u32()` functions remove +The `nng_msg_header_chop()` family of functions removes data from the end of the header of message _msg_. The first function removes _size_ bytes. -The second function removes 4 bytes, and stores them in the value _val32_, +The remaining functions remove 2, 4, or 8 bytes, and stores them in the value +(such as _val32_), after converting them from network-byte order (big-endian) to native byte order. == RETURN VALUES -This function returns 0 on success, and non-zero otherwise. +These function return 0 on success, and non-zero otherwise. == ERRORS diff --git a/docs/man/nng_msg_header_insert.3.adoc b/docs/man/nng_msg_header_insert.3.adoc index f7934738..1b1437f7 100644 --- a/docs/man/nng_msg_header_insert.3.adoc +++ b/docs/man/nng_msg_header_insert.3.adoc @@ -11,7 +11,7 @@ == NAME -nng_msg_header_insert, nng_msg_header_insert_u32 - prepend to message header +nng_msg_header_insert - prepend to message header == SYNOPSIS @@ -20,21 +20,23 @@ nng_msg_header_insert, nng_msg_header_insert_u32 - prepend to message header #include <nng/nng.h> int nng_msg_header_insert(nng_msg *msg, const void *val, size_t size); - +int nng_msg_header_insert_u16(nng_msg *msg, uint16_t val16); int nng_msg_header_insert_u32(nng_msg *msg, uint32_t val32); +int nng_msg_header_insert_u64(nng_msg *msg, uint64_t val64); ---- == DESCRIPTION -The `nng_msg_header_insert()` and `nng_msg_header_insert_u32()` functions -prepend data to the front of the headers of message _msg_, reallocating +The `nng_msg_header_insert()` family of functions +prepends data to the front of the headers of message _msg_, reallocating if necessary. -The first function prepends _size_ bytes, copying them from _val_. The -second function prepends the value _val32_ in network-byte order (big-endian). +The first function prepends _size_ bytes, copying them from _val_. +The remaining functions prepend the specified value (such as _val32_) in +network-byte order (big-endian). == RETURN VALUES -This function returns 0 on success, and non-zero otherwise. +These functions return 0 on success, and non-zero otherwise. == ERRORS diff --git a/docs/man/nng_msg_header_trim.3.adoc b/docs/man/nng_msg_header_trim.3.adoc index 39d8052e..0a9caea3 100644 --- a/docs/man/nng_msg_header_trim.3.adoc +++ b/docs/man/nng_msg_header_trim.3.adoc @@ -11,7 +11,7 @@ == NAME -nng_msg_header_trim, nng_msg_header_trim_u32 - remove data from start of message header +nng_msg_header_trim - remove data from start of message header == SYNOPSIS @@ -20,16 +20,18 @@ nng_msg_header_trim, nng_msg_header_trim_u32 - remove data from start of message #include <nng/nng.h> int nng_msg_header_trim(nng_msg *msg, size_t size); - +int nng_msg_header_trim_u16(nng_msg *msg, uint16_t *val16); int nng_msg_header_trim_u32(nng_msg *msg, uint32_t *val32); +int nng_msg_header_trim_u64(nng_msg *msg, uint64_t *val64); ---- == DESCRIPTION -The `nng_msg_header_trim()` and `nng_msg_header_trim_u32()` functions remove +The `nng_msg_header_trim()` family of functions remove data from the start of the header of message _msg_. The first function removes _size_ bytes. -The second function removes 4 bytes, and stores them in the value _val32_, +The remaining functions removes 2, 4, or 8 bytes, and stores them in the +value (such as _val32_), after converting them from network-byte order (big-endian) to native byte order. diff --git a/docs/man/nng_msg_insert.3.adoc b/docs/man/nng_msg_insert.3.adoc index 911dabbb..cc910531 100644 --- a/docs/man/nng_msg_insert.3.adoc +++ b/docs/man/nng_msg_insert.3.adoc @@ -11,7 +11,7 @@ == NAME -nng_msg_insert, nng_msg_insert_u32 - prepend to message body +nng_msg_insert - prepend to message body == SYNOPSIS @@ -20,26 +20,27 @@ nng_msg_insert, nng_msg_insert_u32 - prepend to message body #include <nng/nng.h> int nng_msg_insert(nng_msg *msg, const void *val, size_t size); - +int nng_msg_insert(nng_msg *msg, uint16_t val16); int nng_msg_insert(nng_msg *msg, uint32_t val32); +int nng_msg_insert(nng_msg *msg, uint64_t val64); ---- == DESCRIPTION -The `nng_msg_insert()` and `nng_msg_insert_u32()` functions prepend data to +The `nng_msg_insert()` family of functions prepends data to the front of the body of message _msg_, reallocating it if necessary. The first function prepends _size_ bytes, copying them from _val_. -The second function prepends the value _val32_ in network-byte order -(big-endian). +The remaining functions prepend the specified value (such as _val32_) +in network-byte order (big-endian). -TIP: This function makes use of pre-allocated "`headroom`" in the message if +TIP: These functions make use of pre-allocated "`headroom`" in the message if available, so it can often avoid performing any reallocation. Applications should use this instead of reallocating and copying message content themselves, in order to benefit from this capability. == RETURN VALUES -This function returns 0 on success, and non-zero otherwise. +These functions return 0 on success, and non-zero otherwise. == ERRORS diff --git a/docs/man/nng_msg_trim.3.adoc b/docs/man/nng_msg_trim.3.adoc index a599b13c..644b6f44 100644 --- a/docs/man/nng_msg_trim.3.adoc +++ b/docs/man/nng_msg_trim.3.adoc @@ -11,7 +11,7 @@ == NAME -nng_msg_trim, nng_msg_trim_u32 - remove data from start of message body +nng_msg_trim - remove data from start of message body == SYNOPSIS @@ -20,22 +20,24 @@ nng_msg_trim, nng_msg_trim_u32 - remove data from start of message body #include <nng/nng.h> int nng_msg_trim(nng_msg *msg, size_t size); - +int nng_msg_trim_u16(nng_msg *msg, uint16_t *val16); int nng_msg_trim_u32(nng_msg *msg, uint32_t *val32); +int nng_msg_trim_u64(nng_msg *msg, uint64_t *val64); ---- == DESCRIPTION -The `nng_msg_trim()` and `nng_msg_trim_u32()` functions remove data from +The `nng_msg_trim()` family of functions removes data from the start of the body of message _msg_. The first function removes _size_ bytes. -The second function removes 4 bytes, and stores them in the value _val32_, +The remaining functions remove 2, 4, or 8 bytes, and stores them in the value +(such as _val32_), after converting them from network-byte order (big-endian) to native byte order. == RETURN VALUES -This function returns 0 on success, and non-zero otherwise. +These functions return 0 on success, and non-zero otherwise. == ERRORS |
