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  -  XS_SHUTDOWN (3)

.ds Aq ’

NAME

xs_shutdown - shut down part of the socket

CONTENTS

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\(cqt 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\(cqt correspond to any active endpoint.

ENOTSUP

Specified endpoint doesn\(cqt 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 <\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


Crossroads I/O 1&.2&.0 XS_BIND (3) 04/03/2016

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