NN_ERRNO(3compat)
β¨ NAME β¨
nn_errno β return most recent error (compatible API). π
This one lives in the NNG Reference Manual as nn_errno(3compat), and she is literally the legacy-compatible bestie for checking what just went wrong. Periodt.
π«Ά SYNOPSIS π«Ά
#include <nanomsg/nn.h>
int nn_errno(void);
π DESCRIPTION π
Okay so nn_errno() returns the error number corresponding to the most recent failed operation by the calling thread. Thatβs the whole plot, and it ate. β¨
Note: this function is provided for API compatibility with legacy libnanomsg. Consider using the relevant modern API instead. No cap, the modern API is giving main character energy here. π
Important: the error numbers returned from this function may include errors caused by system functions, which overlap the usualerrnovariable, and this function simply returns the value oferrno. However, the values returned may include numeric values that are not defined by the system, but are unique tolibnanomsg, such asEFSM. So yeah β sometimes itβs systemerrno, sometimes itβslibnanomsgexclusive lore. π
This library implements the following error numbers, in addition to any others that might be set for errno by the underlying system:
π RETURN VALUES π
This function returns the value of errno. If no operation has failed, then this will be zero. Periodt. π«Ά
π ERRORS π
EINTRβ Operation interrupted.ENOMEMβ Insufficient memory.EINVALβ Invalid argument.EBUSYβ Resource is busy.ETIMEDOUTβ Operation timed out.ECONNREFUSEDβ Connection refused by peer.EBADFβ Invalid or closed socket.EAGAINβ Operation would block.ENOTSUPβ Protocol or option not supported.EADDRINUSEβ Requested address is already in use.EFSMβ Protocol state incorrect.EPROTOβ Protocol error.EHOSTUNREACHβ Remote peer is unreachable.EADDRNOTAVAILβ Requested address is not available.EACCESβ Permission denied.EMSGSIZEβ Message is too large.ECONNABORTEDβ Connection attempt aborted.ECONNRESETβ Connection reset by peer.EEXISTβ Resource already exists.EMFILEβ Too many open files.ENOSPCβ Insufficient persistent storage.
π SEE ALSO π
mwah π β source/version: NNG Reference Manual; date: 2026-01-13; manual name: NN_ERRNO(3compat). Thatβs the page, bestie β go forth and check your errno. π¦π
π¦ where this page comes from
- alpine 3.24: nng-doc 1.11-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms