nn_close(3compat)
| NN_CLOSE(3compat) | NNG Reference Manual | NN_CLOSE(3compat) |
NAME
nn_close - close socket (compatible API)
SYNOPSIS
#include <nanomsg/nn.h> int nn_close(int sock);
DESCRIPTION
The nn_close() function closes the socket sock. Any operations that are currently in progress will be terminated, and will fail with error EBADF.
Note
This function is provided for API
compatibility with legacy libnanomsg. Consider using the relevant
modern API instead.
RETURN VALUES
This function returns zero on success, and -1 on failure.
ERRORS
EBADF
The socket is not open.
ETERM
The library is shutting down.
SEE ALSO
nn_errno(3compat), nn_socket(3compat), nng_compat(3compat), nng(7)
| 2026-06-29 |
