NNG_URL_CLONE(3)

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

πŸ’– 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