Skip to content

Latest commit

 

History

History
71 lines (55 loc) · 2.12 KB

nng_sockaddr_ipc.5.adoc

File metadata and controls

71 lines (55 loc) · 2.12 KB

nng_sockaddr_ipc(5)

NAME

nng_sockaddr_ipc - IPC socket address

SYNOPSIS

#include <nng/nng.h>

enum sockaddr_family {
    NNG_AF_IPC = 2,
};

typedef struct {
    uint16_t sa_family;
    uint16_t sa_path[128];
} nng_sockaddr_ipc;

DESCRIPTION

An nng_sockaddr_ipc is the flavor of nng_sockaddr used to represent addresses associated with IPC communication using the ipc transport.

The following structure members are present:

sa_family

This field will always have the value NNG_AF_IPC.

sa_path

This field holds the C string corresponding to pathname where the IPC socket is located. For systems using UNIX domain sockets, this will be an absolute pathname in the filesystem, where the UNIX domain socket is located. For Windows systems, this is the pathname of the Named Pipe, without the leading \\.pipe\ portion, which will be automatically added.

Note
At this time, there is no support for Linux “abstract sockets”.
Tip
In order to ensure maximum compatibility, applications should avoid hard coding the sizeof the sa_path member explicitly, but 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.
Note
If compatibility with legacy nanomsg applications is required, then pathnames 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.