Topic Path: Symbol Reference > Classes > TIdSocketHandle Class > TIdSocketHandle Methods > Listen Method
TIdSocketHandle.Listen Method

Instructs a socket handle to listen for incoming connection.

procedure Listen(
    const anQueueCount: integer = 5
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.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.