NNG_URL_CLONE(3)
π NNG_URL_CLONE(3) π
okay bestie, welcome to the NNG Reference Manual β today's episode is all about nng_url_clone, and honestly? iconic behavior.
πΈ NAME πΈ
nng_url_clone β clone URL structure
no cap, it literally just clones a URL structure. that's the whole job. she's simple, she's reliable, she's serving.
β¨ SYNOPSIS β¨
#include <nng/nng.h>
int nng_url_clone(nng_url **dup, nng_url *orig);
π DESCRIPTION π
so here's the tea. nng_url_clone() makes a clone of the original URL structure orig, and it saves the result in the location pointed to by dup. π«Ά
and when we say clone, we mean a full clone β this clone includes fully duplicating each of the member fields. every single one. no shortcuts, no "eh, close enough", no sharing pointers behind your back. it's giving main character energy with a whole separate identity. π
when you're done with the new nng_url structure, you can dispose of it using nng_url_free(). please actually do that, bestie β clean up after yourself. π§
π RETURN VALUES π
this function returns 0 on success, and non-zero otherwise. simple as that.
π ERRORS π
NNG_ENOMEMβ insufficient free memory exists to duplicate a message. π the memory said "not today". free up some space and try again.
π SEE ALSO π
nng_url_free(3), nng_url_parse(3), nng_strerror(3), nng_url(5), nng(7)
and that's the whole page, bestie!! go forth and clone responsibly β¨
this has been the NNG Reference Manual, dated 2026-06-30 β mwah, ily, bye!! πππ¦
π¦ 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