Topic Path: Symbol Reference > Classes > TIdSimpleServer Class > TIdSimpleServer Methods > BeginListen Method
TIdSimpleServer.BeginListen Method

Initializes the listener thread for the server.

procedure BeginListen; virtual;

BeginListen is a procedure used to initialize the connection state and ensure that the listener is valid and has called Bind. 

BeginListen recreates the Binding for the server when it has been freed in previous calls to Abort or EndListen

BeginListen calls Bind to allocate the socket handle use by the listener, and to bind the IP address and port number for the server. 

BeginListen briefly calls the Listen method in Binding and sets the the internal flag used to indicate that the server is listening for new connections. 

EndListen is used to sets flad that indicated the server is no longer listening for new connections. 

BeginListen is used in the Listen method when the server is not already listening for connection at the start of the method.

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