NNG_SOCKET(7) | NNG Reference Manual | NNG_SOCKET(7) |
nng_socket - BSD Socket transport (experimental)
The socket transport supports communication between peers across arbitrary BSD sockets, such as those that are created with nng_socket_pair().
This transport only supports listeners, using nng_listener_create().
Attempts to create dialers using this transport will result in NNG_ENOTSUP.
The socket file descriptor is passed to the listener using the NNG_OPT_SOCKET_FD option (as an integer). Setting this option will cause the listener to create a pipe associated backed by the file descriptor.
The protocol between peers using this transport is compatible with the protocol used for the TCP transport, but this is an implementation detail and subject to change without notice.
This transport is experimental, and at present is only supported on POSIX platforms.
No special action is necessary to register this transport.
This transport uses the URL socket://, without further qualification.
The socket address will be of family NNG_AF_UNSPEC. There are no further socket details available.
The following transport option is available:
NNG_OPT_SOCKET_FD
Additionally, the following options may be supported on pipes when the platform supports them:
nng_socket_pair(3), nng_dialer(5), nng_listener(5), nng_options(5), nng_pipe(5), nng_sockaddr(5), nng(7)
2025-01-05 |