Internet Direct (Indy)
Home
PreviousUpNext
TIdFTP.OnDataChannelCreate Event

Event handler signalled following creation of the data channel for data transfer operations.

Pascal
property OnDataChannelCreate: TIdOnDataChannelCreate;

OnDataChannelCreate is a TIdOnDataChannelCreate property that represents the event handler signalled following creation of the data channel used for data transfer operations in the Get and Put methods. 

The data channel for the client will have been initialized prior to triggering the OnDataChannelCreate event handler, and includes the following initializations: 

  • Create an IOHandler for the data channel.
  • Sets the connect timeout to the values used in the control.
  • Copies the TransparentProxy setting from the control channel.
  • TransferTimeout uses the read timeout from the control channel.
  • SendBufferSize is set to the value in the control channel.
  • RecvBufferSize is set to the value in the control channel.
  • The OnWorkBegin, OnWork, and OnWorkEnd event handlers are copied from the FTP client.
  • IPVersion is set to match the control channel.
 

For active connections (where Passive is False), this includes setting the values for the following properties: 

 

Property 
Description 
IP address for the FTP client. 
DataPort indicated in the FTP client. 
DataPortMin indicated in the FTP client. 
DataPortMax indicated in the FTP client. 

 

Arguments passed to the event handler include FTP client and the data channel instance for the event. 

OnDataChannelCreate allows the application to perform logging and maintenace required when the FTP client is about perform a data transfer operation. Assign a procedure to the event handler to allow responding to the event notification. 

Use OnDataChannelDestroy to respond to the event notification that occurs on completion of the data transfer and prior to freeing resources allocated to the data channel.

Discuss enabling LargeStream support in IOHandlers using OnDataChannelCreate

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.