Skip to content

Latest commit

 

History

History
55 lines (41 loc) · 1.4 KB

nn_shutdown.3compat.adoc

File metadata and controls

55 lines (41 loc) · 1.4 KB

nn_shutdown(3compat)

NAME

nn_shutdown - shut down endpoint (compatible API)

SYNOPSIS

#include <nanomsg/nn.h>

int nn_shutdown(int sock, int ep)

DESCRIPTION

The nn_shutdown() shuts down the “endpoint” ep 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.

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 error.

ERRORS

EBADF

The socket sock is not open.

EINVAL

An invalid ep was supplied.