NNG_MSG_HEADER(3)
π NNG_MSG_HEADER(3) π
okay so bestie, this is a page from the NNG Reference Manual, and it's literally about one tiny function that hands you the header of a message. that's it. that's the whole vibe. let's get into it π«Ά
β¨ NAME β¨
nng_msg_header β return message header
πΈ SYNOPSIS πΈ
#include <nng/nng.h>
void *nng_msg_header(nng_msg *msg);
like. one line. one include. we love a minimalist queen π
π¦ DESCRIPTION π¦
so nng_msg_header() returns a pointer to the start of the header content of the message msg. that's it, that's the function, she's simple and she knows it β¨
Note π the message header holds protocol-specific header content. most applications should not need to touch this content at all β like, it's not for you, ngl. but it is available for raw mode sockets, the ones you set with the NNG_OPT_RAW option. iykyk.
Note π the value returned by this gets invalidated by a call to any of the functions that modify the message or the header content. so likeβ¦ don't hold onto it, bestie. it's giving "here for a good time not a long time". any mutation and it's over π
π RETURN VALUES π
a pointer to the start of the message header. periodt.
π ERRORS π
None. not a single one. she simply cannot fail, and honestly? iconic π
β SEE ALSO β
nng_msg_alloc(3)nng_msg_body(3)nng_msg_free(3)nng_msg_header_append(3)nng_msg_header_chop(3)nng_msg_header_insert(3)nng_msg_header_len(3)nng_msg_header_trim(3)nng_msg(5)nng(7)
and that's the whole page bestie, no cap π this one dropped on 2026-06-30 as part of the NNG Reference Manual β NNG_MSG_HEADER(3), still serving header-pointer realness to this very day. slay πβ¨π¦
π¦ where this page comes from
- ubuntu stonking: libnng-dev 1.12.0-1 Β· MIT OR Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms