NNG_MSG_BODY(3)
β¨ NNG_MSG_BODY(3) β¨
okay bestie, welcome to the NNG Reference Manual π this one's a lil baby page but it's important, trust.
πΈ NAME πΈ
nng_msg_body β return message body
π SYNOPSIS π
#include <nng/nng.h>
void *nng_msg_body(nng_msg *msg);
π¦ DESCRIPTION π¦
so nng_msg_body() gives you a pointer to the start of the body content of the message msg. that's it. that's the whole vibe. she's simple, she's straightforward, she's giving β¨pointer to the goodsβ¨.
β οΈ IMPORTANT NOTE, NO CAP β οΈ the value you get back gets invalidated the second you call any function that modifies the message itself. like, it's so over. the culprits arenng_msg_free(),nng_msg_realloc(), and any of thenng_msg_trim(),nng_msg_chop(),nng_msg_append(), ornng_msg_insert()variants. so if you're holding onto that pointer and then you trim or append or whatever β poof, it's stale, it's expired, it's not the moment anymore. π
π RETURN VALUES π
a pointer to the start of the message body. periodt.
π«Ά ERRORS π«Ά
None. literally zero. she doesn't miss. π
π SEE ALSO π
nng_msg_alloc(3)nng_msg_append(3)nng_msg_chop(3)nng_msg_free(3)nng_msg_insert(3)nng_msg_len(3)nng_msg_capacity(3)nng_msg_reserve(3)nng_msg_realloc(3)nng_msg_trim(3)nng_msg(5)nng(7)
okay that's the whole page, you ate that π this was the NNG Reference Manual edition of NNG_MSG_BODY(3), dated 2026-06-30. go forth and grab those body pointers responsibly, bestie π§π
π¦ 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