IPX/SPX Programming Manual

Library Routines
HP NonStop IPX/SPX Programming Manual528022-001
5-52
shutdown, shutdown_nw
shutdown,
shutdown_nw
The shutdown and shutdown_nw functions shut down data transfer, partially or
completely, on an actively connected TCP socket.
error
is the return value. If the call is successful, a zero is returned. If the call is not
successful, -1 is returned. If the call failed, the external variable errno is set as
indicated below in “Errors.”
socket
specifies the socket number for the socket, as returned by the call to socket or
socket_nw.
how
specifies what type of operations on the socket are to be shut down. It must be one
of the following values:
C Synopsis
#include <socket.h>
#include <netdb.h>
error = shutdown (socket, how);
error = shutdown_nw (socket, how, tag);
int socket, error, how;
long tag;
TAL Synopsis
?NOLIST, SOURCE SOCKDEFT
?NOLIST, SOURCE SOCKPROC
error := shutdown (socket, how);
error := shutdown_nw (socket, how, tag);
INT socket, how;
INT(32) tag;
0 Disallow further reads (calls to recv and recv_nw).
1 Disallow further writes (calls to send, send_nw, and
send_nw2)
2 Disallow both reads and writes.