Internet Direct (Indy) Version 9.0.2 Beta
TIdDataChannelThread.StartThread
Prepares and executes the data channel thread.

procedure StartThread(AOperation: TIdFTPOperation);
Parameters
AOperation: TIdFTPOperation
Action to be performed on the data channel.

Description
StartThread is a procedure that allows the threaded data channel to be prepared and executed to perform the data transfer operation identified in AOperation. The data channel thread exists for the lifetime of the threaded client connection. It is initalized and started prior to data transfer operations, and suspended when the data transfer operation is completed.

StartThread determines the socket connection type required for the active or passive client connection, and performs the actions needed to allow the client connection for the DataChannel. When passive connections are used, the TIdSimpleServer object instance in DataChannel will be used to listen for the client connection. When active connections are used, the TIdTCPClient object instance in DataChannel will be connected.

Use SetupDataChannel to configure the IP address and port number to used for the differing client connection types.

If an exceptionm occurs while establishing the connection for DataChannel, the values in ErrorReply are written to the FTP client using the ControlChannel.

When successfully completed, StartThread will begin execution of the threaded data channel for use with FTP data transfer operation.