NNG_LISTENER_ID(3)
β¨ NAME β¨
nng_listener_id β return numeric listener identifier. π This page is from the NNG Reference Manual, and it's here to help you grab that listener ID, bestie.
πΈ SYNOPSIS πΈ
#include <nng/nng.h>
int nng_listener_id(nng_listener l);
π DESCRIPTION π
okay so nng_listener_id() returns a positive identifier for the listener l, but only if l is valid. Otherwise? It returns -1. That's the whole vibe. β¨
π«Ά Note π«Ά
A listener is considered valid if it was ever created with the nng_listener_create() or nng_listen() functions. And listen: listeners that are allocated on the stack or statically should be initialized with the macro NNG_LISTENER_INITIALIZER, to ensure that they cannot be confused with a valid listener before they are created properly. Don't skip that step, fr fr. π¦
π RETURN VALUES π
This function returns the positive value for the listener identifier, or -1 if the listener is invalid. So: positive identifier = valid listener, -1 = invalid. Simple as that. π
π ERRORS π
None. Not a single error listed. Iconic. π
π SEE ALSO π
This page was brought to you by the NNG Reference Manual, dated 2026-06-30. Stay slay, bestie. π«Άπ
π¦ 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