Skip to main content

Customizing Callbacks Issued by the FTP Server

Customizing Callbacks Issued by the FTP Server

You can customize the callbacks generated by the FTP server. By doing so, you can for example, give the user an indication that the server is still working on a large transfer, or allow the user to abort the transfer.

To customize the FTP callbacks:

  1. Create a subclass of %Net.FtpCallbackOpens in a new tab.

  2. In this subclass, implement the RetrieveCallback() method, which is called at regular intervals when receiving data from the FTP server.

  3. Also implement the StoreCallback() method, which is called at regular intervals when writing data to the FTP server.

  4. When you create an FTP session (as described in Establishing an FTP Session), set the Callback property equal to your subclass of %Net.FtpCallbackOpens in a new tab.

For details, see the class documentation for %Net.FtpCallbackOpens in a new tab.

FeedbackOpens in a new tab