diff options
Diffstat (limited to 'doc/xs_close.txt')
-rw-r--r-- | doc/xs_close.txt | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/doc/xs_close.txt b/doc/xs_close.txt new file mode 100644 index 0000000..99b1ed8 --- /dev/null +++ b/doc/xs_close.txt @@ -0,0 +1,52 @@ +xs_close(3) +=========== + + +NAME +---- +xs_close - close Crossroads socket + + +SYNOPSIS +-------- +*int xs_close (void '*socket');* + + +DESCRIPTION +----------- +The _xs_close()_ function shall destroy the socket referenced by the 'socket' +argument. Any outstanding messages physically received from the network but not +yet received by the application with _xs_recv()_ shall be discarded. The +behaviour for discarding messages sent by the application with _xs_send()_ but +not yet physically transferred to the network depends on the value of the +_XS_LINGER_ socket option for the specified 'socket'. + +NOTE: The default setting of _XS_LINGER_ does not discard unsent messages; +this behaviour may cause the application to block when calling _xs_term()_. +For details refer to linkxs:xs_setsockopt[3] and linkxs:xs_term[3]. + + +RETURN VALUE +------------ +The _xs_close()_ function shall return zero if successful. Otherwise it shall +return `-1` and set 'errno' to one of the values defined below. + + +ERRORS +------ +*ENOTSOCK*:: +The provided 'socket' was invalid. + + +SEE ALSO +-------- +linkxs:xs_socket[3] +linkxs:xs_term[3] +linkxs:xs_setsockopt[3] +linkxs:xs[7] + + +AUTHORS +------- +The Crossroads documentation was written by Martin Sustrik <sustrik@250bpm.com> +and Martin Lucina <martin@lucina.net>. |