For information about Globalscape, visit www.globalscape.com. |
Use the Disconnect method to end an event in progress. It is normally used to stop a file transfer.
Syntax
Object.Disconnect()
Example
Set MySite = CreateObject("CuteFTPPro.TEConnection")
MySite.TransferURLAsync
MySite.Disconnect
Configuration Notes
Disconnect is not the same as the standard FTP command QUIT. Instead it is simply a command to stop the current transfer task. You can issue a QUIT command prior to invoking Disconnect by using the RemoteCommand function.
A socket disconnect (more brutal than QUIT) to an FTP server occurs automatically after all transfers and other commands have finished. This is similar to the Connect command, which is implicitly called when a transfer method is invoked.
The example above uses the TransferURLAsync command to pass the TE an FTP file location to download. Since the TransferURLAsync command is asynchronous, you could called TransferURLAsync multiple times consecutively.
If you issue a Disconnect command after issuing multiple TransferURLAsync commands, the last called TransferURLAsync request is the one that is cancelled.