#include <nanomsg/nn.h>
int nn_shutdown(int sock, int ep)
--- version: tip layout: manpage_v2 title: nn_shutdown(3compat) ---
nn_shutdown - shut down endpoint (compatible API)
#include <nanomsg/nn.h>
int nn_shutdown(int sock, int ep)
The nn_shutdown() shuts down the endpoint ep, which is either a listener or
a dialer) on the socket sock.
This will stop the socket from either accepting new connections, or establishing
old ones.
Additionally, any established connections associated with ep will be closed.
| This function is provided for API compatibility with legacy libnanomsg. Consider using the relevant modern API instead. |
This function returns zero on success, and -1 on error.
EBADF
|
The socket sock is not open. |
EINVAL
|
An invalid ep was supplied. |