NNG_SOCKADDR_IPC(5)

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

πŸ’– 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 value NNG_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 the sa_path member explicitly, and instead use the sizeof operator 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