Internet Direct (Indy) Version 9.0.2 Beta
TIdSocketHandle.Listen
Instructs a socket to listen for incoming connection.

procedure Listen(const anQueueCount: integer);
Parameters
const anQueueCount: integer = 5
Number of pending connection requests to allow. Default is 5.

Description
Listen is a procedure that allows a bound socket descriptor to wait for incoming connections. Listen is normally used in server applications that allow multiple simultaneous connections.

anQueueCount identifies the maximum number of pending connection requests to allow for the socket descriptor. Use care when specifying a larger value for anQueueCount; most protocol stacks limit the number of pending connections requests allowed per socket descriptor to a small value. Use Accept to service a pending connection request.

Handle identifies the socket descriptor used to listen for connections, and must not be connected prior to calling Listen.