NNG_PIPE_DIALER(3)
π 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
- 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