blob: cb3f1c63efcc94668e081affa2aa07f673e5e813 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
## nn_shutdown
Shut down endpoint (compatible API).
### Synopsis
```c
#include <nanomsg/nn.h>
int nn_shutdown(int sock, int ep)
```
### Description
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.
### Return Values
This function returns zero on success, and -1 on error.
### Errors
[horizontal]
`EBADF`:: The socket _sock_ is not open.
`EINVAL`:: An invalid _ep_ was supplied.
### See Also
xref:nn_bind.adoc[nn_bind],
xref:nn_connect.adoc[nn_connect],
xref:nn_errno.adoc[nn_errno],
xref:nn_socket.adoc[nn_socket]
|