#include <nng/nng.h> int nng_stream_listener_listen(nng_stream_listener *l);
|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_stream_listener_listen - bind listener to configured address
nng_stream_listener_listen() attempts to bind the listener l
to the local address specified when the listener was created.
This must generally be done before accepting incoming connections using
For some transports this will also perform other actiosn. For example, with TCP listeners it will configure the underlying port into passive mode, ready to accept an incoming connection, and established a listen queue for receiving incoming connections.
If binding the listener requires allocation of an address (for example
when a TCP port number of zero is specified, indicating that an
ephemeral port should be used), this operation will allocate that
This can permit retrieval of the selected address using
typically with the
This function returns 0 on success, and non-zero otherwise.
The address is already in use.
The address is invalid or unavailable.
The listener has been closed.
The listener is already bound.