nanomsg next generation NNG  
Home GitHub Documentation

This documentation is for version v1.2.2 of nng, but the latest released version is v1.2.5. see the documentation for v1.2.5 for the most up-to-date information.
nn_close(3compat)

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.

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.

NNG Reference Manual vv1.2.2 © 2019 Staysail Systems, Inc, © 2018 Capitar IT Group BV
This document is supplied under the MIT License.
nanomsg™ and nng™ are trademarks of Garrett D'Amore.