nng_msg_header_append(3)

nng_msg_header_append3

Append to message header

Usage

#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);

Overview

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 remaining functions append the value (such as val32) in network-byte order (big-endian).

Return values

These functions return 0 on success, and non-zero otherwise.

Errors

NNG_ENOMEM

Insufficient free memory exists.

From libnng-dev 1.10.1-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.