nn_term man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

NN_TERM(3)			nanomsg manual			    NN_TERM(3)

NAME
       nn_term - notify all sockets about process termination

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 <sustrik@250bpm.com[1]>

NOTES
	1. sustrik@250bpm.com
	   mailto:sustrik@250bpm.com

nanomsg Unknown			  12/23/2015			    NN_TERM(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net