'\" t .\" Title: nn_shutdown .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.20 .\" Date: 2024-02-21 .\" Manual: nanomsg 1.2.1 .\" Source: \ \& .\" Language: English .\" .TH "NN_SHUTDOWN" "3" "2024-02-21" "\ \&" "nanomsg 1.2.1" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 .nh .ad l .de URL \fI\\$2\fP <\\$1>\\$3 .. .als MTO URL .if \n[.g] \{\ . mso www.tmac . am URL . ad l . . . am MTO . ad l . . . LINKSTYLE blue R < > .\} .SH "NAME" nn_shutdown \- remove an endpoint from a socket .SH "SYNOPSIS" .sp \fB#include \fP .sp \fBint nn_shutdown (int \fIs\fP, int \fIhow\fP);\fP .SH "DESCRIPTION" .sp Removes an endpoint from socket \fIs\fP. \fIhow\fP parameter specifies the ID of the endpoint to remove as returned by prior call to nn_bind(3) or nn_connect(3). \fInn_shutdown()\fP call will return immediately, however, the library will try to deliver any outstanding outbound messages to the endpoint for the time specified by \fINN_LINGER\fP socket option. .SH "RETURN VALUE" .sp If the function succeeds zero is returned. Otherwise, \-1 is returned and \fIerrno\fP is set to to one of the values defined below. .SH "ERRORS" .sp \fBEBADF\fP .RS 4 The provided socket is invalid. .RE .sp \fBEINVAL\fP .RS 4 The \fIhow\fP parameter doesn\(cqt correspond to an active endpoint. .RE .sp \fBEINTR\fP .RS 4 Operation was interrupted by a signal. The endpoint is not fully closed yet. Operation can be re\-started by calling \fInn_shutdown()\fP again. .RE .sp \fBETERM\fP .RS 4 The library is terminating. .RE .SH "EXAMPLE" .sp .if n .RS 4 .nf .fam C s = nn_socket (AF_SP, NN_PUB); eid = nn_bind (s, "inproc://test"); nn_shutdown (s, eid); .fam .fi .if n .RE .SH "SEE ALSO" .sp nn_socket(3) nn_bind(3) nn_connect(3) nanomsg(7) .SH "AUTHORS" .sp .MTO "sustrik\(at250bpm.com" "Martin Sustrik" ""