NNG_MSG_BODY(3)

πŸ“¦
version 1.12.0 Β· 4 versions
, in ubuntu stonking

✨ 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 are nng_msg_free(), nng_msg_realloc(), and any of the nng_msg_trim(), nng_msg_chop(), nng_msg_append(), or nng_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 πŸ‘‘


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