The socket transport provides communication support between
peers across a arbitrary BSD sockets, such as those that are
created with nng_socket_pair()
.
This transport only supports listeners, using nng_listener_create()
.
Note
|
Attempts to create a dialer 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 (which is read-only and can be set multiple times) will cause the listener
to create a pipe associated backed by the file descriptor.
The protocol between peers using this pipe is at present compatible with the protocol used for the TCP transport, but this is an implementation detail and subject to change without notice.
Note
|
This transport is experimental, and at present is only supported on POSIX platforms. |
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
-
(int) This is a write-only option, that may be set multiple times on a listener. The listener will create a pipe backed by the given file descriptor passed as an argument.
Additionally, the following options may be supported on pipes when the platform supports them: