Internet Direct (Indy)
Home
PreviousUpNext
TIdSocketHandle.Listen Method

Instructs a socket handle to listen for incoming connection.

Pascal
procedure Listen(
    const anQueueCount: integer = 5
);
Parameters 
Description 
anQueueCount 
Number of pending connection requests to allow. The default value is 5. 

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 handle allocated by the protocol stack and used to listen for connections, and must not be connected prior to calling Listen. 

Listen uses GStack to allow the protocol stack to listen for queued connection requests on Handle.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.