TldDataChannelThread is a TldThread [C] descendant that implements the data channel used when a threaded FTP client connection needs to read or write data using the FTP STOR, STOU, APPE, RETR, LIST, or NLST command verbs.

TldDataChannelThread provides properties that represent the connection used for an acive or passive data channel for the FTP client, the control channel from the threaded client, and TldRFCReply [C] properties representing the success and error messages used when performing data transfer. TIdDataChannelThread provides methods that create the active or passive connection, initialize the data channel, or start the thread of execution.

TldDataChannelThread can represent an active or a passive connection type on the data channel. When passive connections are used, the connection is constructed as a TldSimpleServer [C] object instance. When the TldDataChannelThread thread is started, the data channel will be used to listen [C] for a client connection.

When active connections are opened by the client thread, the connection is constructed using a TldTCPCIient object instance bound to the FTP data port 20. When the TIdDataChannelThread thread is started, the data channel will be connected.

During execution, the data channel thread uses the Data property to access the TStrings or TStream values used during the data transfer operation. After performing the transfer operation, the socket [C] for the data channel in the thread is disconnected, and the Success or Error message is written using the control channel for the threaded client connection. The data channel thread is stopped after execution of the transfer operation.

TIdDataChannelThread is the thread type created for use in the TIdFTPServerThread.DataChannel property in a threaded client connection. 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.

+1 0

Post a comment