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

fplisten

Listen for connections on a socket.

Declaration

Source position: socketsh.inc line 161

function fplisten(

  s: cint;

  backlog: cint

):cint;

Description

fpListen listens for up to backlog connections from socket S. The socket S must be of type SOCK_STREAM or Sock_SEQPACKET.

The function returns 0 if a connection was accepted, -1 if an error occurred.

Errors

Errors are reported in SocketError, and include the following:

ESockEBADF
The socket descriptor is invalid.
ESockENOTSOCK
The descriptor is not a socket.
SYS_EOPNOTSUPP
The socket type doesn't support the Listen operation.

See also

fpSocket

  

Create new socket

fpBind

  

Bind a socket to an address.

fpConnect

  

Open a connection to a server socket.


Documentation generated on: Nov 16 2015