next up previous contents index
Next: Sock2File Up: Functions and Procedures Previous: SetSocketOptions

Shutdown

   

Declaration:

Function Shutdown (Sock:Longint;How:Longint) : Longint;

Description:

ShutDown closes one end of a full duplex socket connection, described by Sock. How determines how the connection will be shut down, and can be one of the following:

0
: Further receives are disallowed.
1
: Further sends are disallowed.
2
: Sending nor receiving are allowed.

On succes, the function returns 0, on error -1 is returned.

Errors:

SocketError is used to report errors, and includes the following:

SYS_EBADF
The socket descriptor is invalid.
SYS_ENOTCONN
The socket isn't connected.
SYS_ENOTSOCK
The descriptor is not a socket.

See also:

Socket, Connect



Michael Van Canneyt
Thu Sep 10 13:59:33 CEST 1998