NNG_PIPE_DIALER(3)

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

πŸ’– NAME πŸ’–

nng_pipe_dialer β€” bestie, this is the one that hands you back the dialer that created a pipe 🫢


✨ SYNOPSIS ✨

#include <nng/nng.h>

nng_dialer nng_pipe_dialer(nng_pipe p);

🌸 DESCRIPTION 🌸

okay so. nng_pipe_dialer() is literally the "who's your parent" function for pipes. you pass it a pipe p, and it gives you back the nng_dialer that created that pipe. icon behavior, no cap πŸ’…

but here's the plot twist πŸ‘€ β€” if the pipe was not created by a dialer, then the value you get back will have an identifier (that's what nng_dialer_id() gives you) of -1. so if you see a -1 in there, that pipe did not come from a dialer, periodt.

🧚 careful bestie β€” a -1 id is the clue that there's no dialer behind this pipe, so don't go treating that returned value like a real dialer!

πŸ”₯ RETURN VALUES πŸ”₯

so what do you actually get? this function returns the dialer that created the pipe. easy, slay. πŸ’–

unless the pipe was not created by a dialer β€” in that case, you get back a value initialized with NNG_DIALER_INITIALIZER. that's the "nobody's home" version of a dialer, and it's giving placeholder energy πŸ™ˆ


πŸ’€ ERRORS πŸ’€

None. literally none. zero. not a single one. this function does not fail on you, and that's the vibe check passing βœ…βœ¨


πŸ‘‘ SEE ALSO πŸ‘‘


made with love by the NNG Reference Manual crew πŸŽ€ this page is from the 2026-06-30 drop, NNG Reference Manual edition β€” go off, and remember: -1 means no dialer, iykyk πŸ’œπŸ¦‹

πŸ“¦ where this page comes from