Internet Direct (Indy) Version 9.0.2 Beta
|
function Listen: Boolean; virtual;
Listen call BeginListen to initialize the server socket handle and state prior to entering the listener thread of execution. Listen provides a control loop that uses both AbortRequested and the socket handle Binding to determine when the server should stop listening for a client connection.
While AbortRequested is False, Listen will insure that the Binding is readable using the AcceptWait timeout value. When a connection request is detected, Listen calls Accept using the Handle for Binding.
When AbortRequested is True or a new connection has handled with Accept, Listen will close and invalidate the socket handle in ListenHandle.