Internet Direct (Indy) Version 9.0.1 Beta
TSlaveThread.Run
Provides the main thread of execution for the Indy thread framework.

procedure Run; override;
Description
Run is a procedure that provides the main thread of execution for the Indy thread framework. Run ensures that the client Connection is valid and ready to perform read operations.

Run captures incoming messages from the client connection and provide the data to Receiver for interpretation. Run remains active until the thread is terminated. When a new message is detected, Run verifies that the CRC for the message matched the CRC value in the encapsulation header. When the CRC values do not match, Run will raise an EIdException exception.

Run also allows the Slaveparent to perform data transformation using Receiver. If an error occurs during data transformation, Run will raise an EIdException exception.

Finally, Run performs the action specified in the message type header in Receiver. This action can include closing the client connection due to an error in either the data or the session, or allowing the client to receive the result of the tunnel transformation.