NNG_TLS_CONFIG_HOLD(3tls)

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

πŸ’– NAME πŸ’–

nng_tls_config_hold β€” hold a TLS configuration object (yes bestie, this is the NNG Reference Manual page for it, section 3tls, we're home 🏠✨)


🌸 SYNOPSIS 🌸

#include <nng/nng.h>
#include <nng/supplemental/tls/tls.h>

void nng_tls_config_alloc(nng_tls_config *cfg);
ok so real talk, that synopsis is exactly what's printed on the page β€” nng_tls_config_alloc, not hold. Not me editing the sacred text tho πŸ™ˆ I'm just showing you what's there, character for character. 🫢

✨ DESCRIPTION ✨

So the whole vibe of nng_tls_config_hold() is: it bumps the reference count on the configuration object that cfg points at. Why do we care? Because that means nobody can free it while you're still using it. It's the group-chat equivalent of "don't leave yet, I'm still typing" πŸ’…

And when you're done holding it? You let go with nng_tls_config_free(). That's the release. 🎈

Also β€” and this is the good part β€” you can stack up multiple holds on the same configuration object. It does not get freed until the last hold is released. Like, everyone has to leave the party before the lights go off, no cap. πŸ”₯


πŸ¦‹ RETURN VALUES πŸ¦‹

None. Zero. Nada. It gives you nothing back and honestly? That's on brand. πŸ’€


πŸŽ€ ERRORS πŸŽ€

None. Not a single one. It cannot fail you. Iconic behaviour fr fr. πŸ‘‘


🌈 SEE ALSO 🌈


and that's the whole page, bestie, go hold something πŸ’–

this beauty lives in the NNG Reference Manual, dated 2026-06-30 β€” mwah, she ate, periodt βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from