NNG_PUB_OPEN(3)
π NNG_PUB_OPEN(3) β the NNG Reference Manual, but make it cute
okay bestie, listen up, because this one is literally the doorway to being a broadcaster π
β¨ NAME β¨
nng_pub_open β create pub socket π€
πΈ SYNOPSIS πΈ
#include <nng/nng.h>
#include <nng/protocol/pubsub0/pub.h>
int nng_pub0_open(nng_socket *s);
int nng_pub0_open_raw(nng_socket *s);
π¦ DESCRIPTION π¦
So here's the tea, lovely. The nng_pub0_open() function creates a pub version 0</> socket and hands it back to you at the location that s points to. That's it, that's the whole vibe β¨
And the nng_pub0_open_raw() function? She creates a pub version 0 socket but in raw mode π and returns it at the location pointed to by s. Yes queen, raw mode is its own whole personality, iykyk.
heads up: both of these drop the socket into whatevernng_socket *sis pointing at, so make suresis actually pointing somewhere real, bestie. No vibes-only pointers π
π RETURN VALUES π
These functions return 0 on success, and non-zero otherwise. That's the whole report card. 0 = slay, anything else = not slay π
π₯ ERRORS π₯
NNG_ENOMEMβ Insufficient memory is available. like the laptop is going through it πNNG_ENOTSUPβ The protocol is not supported. she's just not available for this, no cap π
π SEE ALSO π
and that's the whole page, bestie π«Ά this was the NNG Reference Manual, dated 2026-06-30, and honestly? iconic. go open a pub socket and be the main character you were always meant to be ππΈβ¨
π¦ 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