NNG_REP_OPEN(3)

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

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