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


Manual Reference Pages  -  NN_TERM (3)

.ds Aq ’

NAME

nn_term - notify all sockets about process termination

CONTENTS

SYNOPSIS

#include <nanomsg/nn.h>

void nn_term (void);

DESCRIPTION

To help with shutdown of multi-threaded programs nanomsg provides the nn_term() function which informs all the open sockets that process termination is underway.

If a socket is blocked inside a blocking function, such as nn_recv(3), it will be unblocked and ETERM error will be returned to the user. Similarly, any subsequent attempt to invoke a socket function other than nn_close(3) after nn_term() was called will result in 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.

The nn_term() function itself is non-blocking.

EXAMPLE

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

SEE ALSO

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

AUTHORS

Martin Sustrik <\m[blue]sustrik@250bpm.com\m[][1]>

NOTES

1. sustrik@250bpm.com  mailto:sustrik@250bpm.com
Search for    or go to Top of page |  Section 3 |  Main Index


nanomsg Unknown NN_TERM (3) 03/17/2016

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