[Overview][Constants][Types][Procedures and functions][Index] Reference for unit 'Sockets' (#rtl)

fpshutdown

Close one end of full duplex connection.

Declaration

Source position: socketsh.inc line 170

function fpshutdown(

  s: cint;

  how: cint

):cint;

Description

fpShutDown closes one end of a full duplex socket connection, described by S. The parameter 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

fpSocket

  

Create new socket

fpConnect

  

Open a connection to a server socket.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.