NNG_PIPE_LISTENER(3)

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

πŸ’– NNG_PIPE_LISTENER πŸ’–

okay bestie, gather round, because this is a lil function from the NNG Reference Manual that answers one very specific question and we're gonna slay it together ✨


✨ NAME ✨

nng_pipe_listener β€” return the listener that created a pipe πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <nng/nng.h>

nng_listener nng_pipe_listener(nng_pipe p);

🌸 DESCRIPTION 🌸

so. you've got a pipe. cute! iconic even. but like… who made you? πŸ‘€

The nng_pipe_listener() function returns the nng_listener that created the pipe p. it's giving "let me introduce you to your mother" energy and honestly we love that for you.

BUT. and this is the important part bestie, do not skip this β€” if the pipe was not created by a listener, then the returned value will have an identifier (nng_listener_id()) of -1. so like, -1 is basically the "no listener, no parents, orphan era, main character origin story" signal πŸ’€. don't be out here calling nng_listener_id() on it and expecting a real one, iykyk.


πŸ‘‘ RETURN VALUES πŸ‘‘

This function returns the listener that created the pipe, unless it was not created by a listener β€” in which case a value initialized with NNG_LISTENER_INITIALIZER will be returned. periodt. πŸ’…


πŸ™ˆ ERRORS πŸ™ˆ

None. zero. nada. not a single one. no error codes, no drama, no tears. she simply returns. ate and left no crumbs πŸ“


πŸ’œ SEE ALSO πŸ’œ


that's the whole page bestie, no cap, every detail intact, nothing skipped 🫢 go forth and check your pipes' parentage responsibly πŸ’–

NNG_PIPE_LISTENER(3) β€” from the NNG Reference Manual, dated 2026-06-30 🌈 mwah, bye!! πŸŽ€βœ¨

πŸ“¦ where this page comes from