NNG_MSG_DUP(3)
π nng_msg_dup(3) β NNG Reference Manual π
okay bestie, gather round, because this one is literally the dupe button for your messages. it's nng_msg_dup, and yes, she lives in the NNG Reference Manual, and yes, she is giving copy-paste main character energy. β¨
πΈ NAME πΈ
nng_msg_dup β duplicate a message π«Ά
β¨ SYNOPSIS β¨
#include <nng/nng.h>
int nng_msg_dup(nng_msg **dup, nng_msg_t *orig);
π DESCRIPTION π
so here's the tea: nng_msg_dup() makes a duplicate of the original message orig, and saves the result in the location pointed by dup.
the actual message body and header content is copied β like, fully copied, no shortcuts, no cap. π
but listen. the duplicate may contain a different amount of unused space than the original message. not a bug, just how she is. don't come for her. π
π RETURN VALUES π
this function returns 0 on success, and non-zero otherwise. that's it, that's the vibe check. π
π ERRORS π
NNG_ENOMEMβ Insufficient free memory exists to duplicate a message. π bestie the memory said no and honestly we have to respect it.
π¦ SEE ALSO π¦
and that's the whole page, periodt. π this iconic lil entry is brought to you by the NNG Reference Manual, dated 2026-06-30, and she ate fr fr. now go duplicate responsibly, bestie β and don't forget to nng_msg_free(3) when you're done, because memory leaks are NOT the aesthetic. π§β¨
π¦ 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