#include <nng/nng.h> int nng_stream_listener_listen(nng_stream_listener *l);
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.