NNG_REP_OPEN(3)
π NNG_REP_OPEN(3) π
okay bestie, gather round, because we're opening a whole reply socket and it's about to be iconic. this is page NNG_REP_OPEN(3) from the NNG Reference Manual, and no cap, it's short and sweet β but every single detail matters, so let's not skip a crumb. β¨
πΈ NAME πΈ
nng_rep_open β create rep socket
π SYNOPSIS π
#include <nng/nng.h>
#include <nng/protocol/reqrep0/rep.h>
int nng_rep0_open(nng_socket *s);
int nng_rep0_open_raw(nng_socket *);
π¦ DESCRIPTION π¦
so the way this works is adorable actually:
nng_rep0_open() creates a rep version 0 socket and hands it back to you at the location pointed to by s. that's it, that's the whole vibe. π
and then there's nng_rep0_open_raw(), which does the same little dance but makes a rep version 0 socket in raw mode, returning it at the location pointed to by s. raw mode said "i'm the main character, i do my own framing." π
β RETURN VALUES β
both of these functions return 0 on success, and non-zero otherwise. classic. lowkey zero is the slay number here. π«Ά
π ERRORS π
NNG_ENOMEMβ not enough memory available, like when the group chat is full and your pics won't send. insufficient memory, bestie. πNNG_ENOTSUPβ the protocol is not supported. it's giving "this feature isn't in your build," and we move on. π
π SEE ALSO π
and that's the whole page fr fr. this little masterpiece is from the NNG Reference Manual, dated 2026-06-30. go open that socket, bestie β you ate. πβ¨ππ¦πΈ
π¦ 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