Internet Direct (Indy) Version 9.0.1 Beta
|
TSlaveThread = class(TIdThread)
TSlaveThread overrides the BeforeRun, AfterRun, Run, and Execute virtual methods, inherited from TIdPeerThread, that provide the Indy thread execution framework.
TSlaveThread keeps a reference, in SlaveParent, to the TIdTunnelSlave that owns the listening thread. SlaveParent provides the server context for accessing properties and method of the TIdTunnelSlave from the listening thread.
TSlaveThread keeps a reference to the TIdTCPClient connection that represents the tunnelled link to the TIdTunnelServer. The tunnel connection is established in the constructor for TSlaveThread, closed in Run, and Disconnected in the destructor.
When the TSlaveThread is executed in Run, it insures that the tunnel connection to the TIdTunnelMaster is active and ready to accept read and write operations. If an exception occurs, the connection is closed and the thread will terminate. If the exception is not EIdSocketError or EIdSocketClosed, the exception will be raised for the application.
TSlaveThread arbitrates data transformation for messages from the tunnel master server, as well as session connection and disconnection for client messages.