#include <nng/transport/ipc/ipc.h> int nng_ipc_register(void);
|This documentation is for the TIP (development tree) of NNG and may represent unreleased changes or functionality that is experimental, and is subject to change before release. The latest released version is v1.3.2. See the documentation for v1.3.2 for the most up-to-date information.|
nng_ipc - IPC transport
(transport, ipc) The ipc transport provides communication support between sockets within different processes on the same host. For POSIX platforms, this is implemented using UNIX domain sockets. For Windows, this is implemented using Windows Named Pipes. Other platforms may have different implementation strategies.
This transport is generally built-in to the core, so no extra steps to use it should be necessary.
This transport uses URIs using the scheme
ipc://, followed by a path
name in the file system where the socket or named pipe should be created.
On Windows, all names are prefixed by
When using relative paths on POSIX systems, the address used and returned
in properties like
If compatibility with legacy nanomsg applications is required,
then path names must not be longer than 122 bytes, including the final
unix:// scheme is an alias for
ipc:// and can be used inter-changeably, but only
on POSIX systems.
The purpose of this scheme is to support a future transport making use of
on Windows systems, at which time it will be necessary to discriminate between
the Named Pipes and the
AF_UNIX based transports.
On Linux, this transport also can support abstract sockets.
Abstract sockets use a URI-encoded name after the scheme, which allows arbitrary values to be conveyed
in the path, including embedded
For example, the name
"a\0b" would be represented as
An empty name may be used with a listener to request “auto bind” be used to select a name.
In this case the system will allocate a free name.
The name assigned may be retrieved using
|NNG cannot represent an abstract socket with the empty name.|
Abstract names do not include the leading
Abstract sockets do not have any representation in the file system, and are automatically freed by
the system when no longer in use.
Abstract sockets ignore socket permissions, but it is still possible to determine the credentials
of the peer with
The following transport options are supported by this transport, where supported by the underlying platform.