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

Listens for remote connection requests.

procedure Listen(
    ASocket: TIdStackSocketHandle; 
    ABackLog: Integer
); override;
SOcket handle for the operation.
Unhandled connection requests allowed for the socket handle. 

Listen is an overridden procedure that implements the method used to access the Listen() API for the protocol stack implementation. 

Listen allows the socket handle in ASocket to begin listening for connection requests. ASocket is the socket handle to use for listening. Listen is generally used in servers that can have multiple incoming connection requests. 

ABacklog indicates the number of pending connection requests allowed for ASocket. 

Listen can be called than once on the same socket handle. This has the effect of updating the current backlog for the listening socket to the most recent value. If there are more pending connections than the new backlog value, the excess pending connections will be dropped. 

Use Accept to accept a pending connection request with a new socket handle for the connection. 

Exceptions occuring in the method are re-raised using either the EIdSocketError or EIdWrapperException exception types.

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