NNG_SOCKADDR_IPC(5)
π NNG_SOCKADDR_IPC(5) π
okay bestie, gather round, because we're talking about nng_sockaddr_ipc β straight out of the NNG Reference Manual β and it's literally the lil' address struct that makes IPC communication happen. it's giving "where do I find the socket" energy and honestly? iconic.
β¨ NAME β¨
nng_sockaddr_ipc β the IPC socket address, periodt π
πΈ SYNOPSIS πΈ
#include <nng/nng.h>
enum sockaddr_family {
NNG_AF_IPC = 2,
};
typedef struct {
uint16_t sa_family;
char sa_path[128];
} nng_sockaddr_ipc;
no cap, that's the whole vibe right there π¦
π DESCRIPTION π
An nng_sockaddr_ipc is the flavor of nng_sockaddr used to represent addresses associated with IPC communication using the ipc transport. like, when you need to talk IPC, this is the address struct you're reaching for, bestie π«Ά
Here's the cast of characters β the structure members that are present:
sa_familyβ this field will always have the valueNNG_AF_IPC. every single time. no exceptions. it's committed πsa_pathβ this field holds the C string corresponding to the path name where the IPC socket is located. and okay, this one's a little β¨system dependentβ¨ so let me break it down:- for systems using UNIX domain sockets, this will be a path name in the file system, where the UNIX domain socket is located.
- for Windows systems, this is the path name of the Named Pipe, without the leading
\\.pipe\portion β because that part gets automatically added for you. so thoughtful of it π
Note π β at this time, there is no support for abstract sockets. i know, i know. someday maybe. but rn? nope.
Tip β¨ β in order to ensure maximum compatibility, applications should avoid hard coding the size of thesa_pathmember explicitly, and instead use thesizeofoperator to determine its actual size at compile time. furthermore, the size is guaranteed to be at least 128, but paths of this length may not be supported on all systems. so like, don't get cocky with it π
Tip π¦ β portable applications should restrict themselves to path names of not more than 90 bytes. most systems have limits around 100 bytes, but at least one system (HP-UX) is restricted to not more than 92 bytes including the NUL. so HP-UX is the strict friend in the group chat and we respect her boundaries fr fr.
Note π β if compatibility with legacy nanomsg applications is required, then path names must not be longer than 122 bytes, including the final NUL byte. this is because legacy versions of nanomsg cannot express URLs longer than 128 bytes, including the ipc:// prefix. that's just the lore, iykyk.
π SEE ALSO π
and that's the whole page, bestie β go forth and address your IPC sockets correctly ππ you absolutely ate this documentation, no crumbs left β
NNG Reference Manual Β· version dated 2026-06-30 Β· mwah, love u, bye ππ§π
π¦ 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