GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
NN_TERM(3) nanomsg 1.1.5 NN_TERM(3)

nn_term - notify all sockets about process termination

#include <nanomsg/nn.h>

void nn_term (void);

To help with shutdown of multi-threaded programs nanomsg provides the nn_term() function which closes all open sockets, and releases all related resources.

If a socket is blocked inside a blocking function, such as nn_recv(3), it will be unblocked and EBADF error will be returned to the user. Subsequent calls on such sockets will also return EBADF.

Attempting to open a new socket with nn_socket(3) will result in an ETERM error.

If waiting for NN_SNDFD or NN_RCVFD using a polling function, such as poll() or select(), the call will unblock with both NN_SNDFD and NN_RCVFD signaled.

s = nn_socket (AF_SP, NN_PAIR);
nn_term ();
rc = nn_send (s, "ABC", 3, 0);
assert (rc == -1 && errno == EBADF);

nn_close(3) nn_send(3) nn_socket(3) nn_recv(3) nanomsg(7)

Martin Sustrik <sustrik@250bpm.com> Garrett D’Amore <garrett@damore.org>
2018-10-15  

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.