Internet Direct (Indy)
Home
PreviousUpNext
TIdStackDotNet.Listen Method

Listens for remote connection requests.

Pascal
procedure Listen(
    ASocket: TIdStackSocketHandle; 
    ABackLog: Integer
); override;
Parameters 
Description 
ASocket 
SOcket handle for the operation.
 
ABackLog 
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.

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.