NNG_PIPE_ID(3)
π NNG_PIPE_ID(3) β the nng_pipe_id girlies' manual π
okay so this is a page from the NNG Reference Manual, and it's abt one (1) tiny little function that hands u a pipe's numeric id. that's it. that's the whole vibe. but she's iconic so let's talk abt her π
β¨ NAME β¨
nng_pipe_id β return numeric pipe identifier π
πΈ SYNOPSIS πΈ
#include <nng/nng.h>
int nng_pipe_id(nng_pipe p);
like. look at her. one include, one function, no notes. slay.
π¦ DESCRIPTION π¦
so nng_pipe_id() returns a positive identifier for the pipe p, bestie β but only if p is valid. if she's not valid? u get -1. that's the whole deal. no cap.
π Note (listen up, this part matters) a pipe counts as valid if it was ever created by the socket. that's the bar. that's the whole test. now here's the part where u could get got π β pipes that are allocated on the stack or statically should be initialized with the macro NNG_PIPE_INITIALIZER so they can't get confused with a valid pipe. literally just do it. it's giving "uninitialized garbage pretending to be a real pipe" and we are NOT doing that in this house π
β RETURN VALUES β
she returns the positive value for the pipe identifier π«Ά β or -1 if the pipe is invalid. that's it. that's the return value. no in-between, no "it depends", periodt.
π ERRORS π
None. literally none. zero. zilch. she said "i don't do errors" and honestly? respect π
π₯ SEE ALSO π₯
and that's the page!! go forth and check ur pipe ids responsibly, and remember: initialize ur stack pipes with NNG_PIPE_INITIALIZER or the vibe check will fail u πβ¨
mwah π β this was the NNG Reference Manual, dated 2026-06-30. xoxo, ur local Unix girlie ππΈπ¦
π¦ 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