Internet Direct (Indy) Version 9.0.2 Beta
TIdListenerThread
Listener thread for TCP Servers.

TIdListenerThread = class(TIdThread)
Description
TIdListenerThread is a thread, based on TIdThread, that listens for client connections. A TIdListenerThread is used by TIdTCPServer, and descendants, to detect new client connection requests and to spawn new TIdPeerThreads for each successful connection to the server.

TIdListenerThread maintains a reference to the server that owns the listening thread, and a list of socket handles that have been accepted by the server. TIdListenerThread also provides a general mechanism to encapsulate the time that the listening thread should wait to accept new socket connection requests.

TIdListenerThread differs from a typical TThread by extending the Execute method to allow access to BeforeRun, Run, and AfterRun methods. In addition, Start and Stop methods are provide allow finer control of thread initialization, resumption, and immediate termination.