xs_shutdown man page on DragonFly

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

XS_BIND(3)		     Crossroads I/O Manual		    XS_BIND(3)

NAME
       xs_shutdown - shut down part of the socket

SYNOPSIS
       int xs_shutdown (void *socket, int how);

DESCRIPTION
       This function partially closes the socket. It disconnects or unbinds an
       endpoint previously connected or bound by xs_bind() or xs_connect().
       how parameter is the endpoint ID as returned by xs_bind() or
       xs_connect().

       Endpoint shutdown honours linger socket option. I.e. if there are any
       pending outbound messages, Crossroads will try to push them to the
       network for the specified amount of time before giving up.

       Note: inproc endpoints don’t support partial shutdown at the moment.

RETURN VALUE
       The xs_shutdown() function shall return zero if successful. Otherwise
       it shall return -1 and set errno to one of the values defined below.

ERRORS
       EINVAL
	   The endpoint ID supplied doesn’t correspond to any active endpoint.

       ENOTSUP
	   Specified endpoint doesn’t support partial shutdown.

       ETERM
	   The context associated with the specified socket was terminated.

       ENOTSOCK
	   The provided socket was invalid.

EXAMPLE
       Binding socket to an endpoint, then unbinding it.

	   /* Create a socket */
	   void *socket = xs_socket (context, XS_PUB);
	   assert (socket);
	   /* Bind it to a TCP endpoint */
	   int id = xs_bind (socket, "tcp://*:5555");
	   assert (id != -1);
	   /* Unbind the socket from the endpoint */
	   rc = xs_shutdown (socket, id);
	   assert (rc == 0);

SEE ALSO
       xs_connect(3) xs_bind(3) xs(7)

AUTHORS
       This manual page was written by Martin Sustrik <sustrik@250bpm.com[1]>.

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

Crossroads I/O 1.2.0		  02/17/2016			    XS_BIND(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