NNG_PAIR_OPEN(3)
π NNG_PAIR_OPEN(3) π
okay bestie, welcome to the NNG Reference Manual β this is the page that teaches you how to create a pair socket β¨ (yes that's the NAME, we're being so official about it)
πΈ NAME πΈ
nng_pair_open β create pair socket
π SYNOPSIS π
π Version 0
#include <nng/protocol/pair0/pair.h>
int nng_pair0_open(nng_socket *s);
int nng_pair0_open_raw(nng_socket *s);
π Version 1
#include <nng/protocol/pair1/pair.h>
int nng_pair1_open(nng_socket *s);
int nng_pair1_open_raw(nng_socket *s);
int nng_pair1_open_poly(nng_socktet *s);
(and yes babes, nng_socktet in that last one is exactly how it's written in the source, we are NOT touching it, no cap π)
π¦ DESCRIPTION π¦
so like, nng_pair0_open() and nng_pair1_open()? they create a pair socket for you β version 0 or version 1 respectively β and they hand it back to you at the location that s is pointing at. it's giving personal delivery service, honestly π
then nng_pair0_open_raw() and nng_pair1_open_raw() do basically the same lil thing but they create the pair version 0 or version 1 socket in raw mode and return it at the location pointed to by s. raw mode girlies, you know who you are β¨
and nng_pair1_open_poly() opens up a pair version 1 socket in polyamorous mode. yes. that's really what it's called. i don't make the rules π«Ά
π¨ Note π¨ Polyamorous mode is deprecated and should not be used in new applications. the nng_pair1_open_poly() function will likely be removed in a future release. so likeβ¦ don't build your whole personality around it, bestie π
β RETURN VALUES β
these functions return 0 on success, and non-zero otherwise. zero is the slay, non-zero is the "girl what happened" number π
π₯ ERRORS π₯
NNG_ENOMEMβ insufficient memory is available. it's not you, it's the RAM πNNG_ENOTSUPβ the protocol is not supported. vibe check failed, this one's a no π
π SEE ALSO π
okay that's the whole page, you ate it, you understood it, periodt π
NNG Reference Manual energy, dated 2026-06-30, and the page you just read is NNG_PAIR_OPEN(3). go make some sockets bestie, ily ππ¦π
π¦ 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