+1 vote
by (640 points)
edited

A Sftp class has one AbortTransfer method, that "Aborts pending transfers". Does this method aborts not-transfer operations, such as connecting, logging or changing current directory?

Does Ftp::Abort aborts connecting, logging or changing current directory?

Applies to: Rebex SFTP, Rebex FTP/SSL

1 Answer

+1 vote
by (13.3k points)
edited
 
Best answer

SFTP

  • Sftp.AbortTransfer aborts only the file(s) upload, file(s) download and getting a directory list operations. It does not abort non-transfer operations (including the ChangeDirectory).

FTP

  • Ftp.Abort tries to abort any of FTP Service Commands operation. FTP service commands include file upload, download, rename, delete file or directory, create directory, get the directory listing. For a complete list see section 4.1.3. of RFC 959. It does NOT include connect and login operations. Internally the Ftp.Abort issues the ABOR FTP command when aborting the download operation. Upload simply stops sending data. And other operation stops waiting for server response (similar to situation when timeout is exceeded).

UPDATE: Added better description what Ftp.Abort does.

by (640 points)
Thanks! How I can abort async connect/login operations for Ftp and any "non-transfer operation" for Sftp?
by (13.3k points)
Most non-transfer operations are instant. If non-transfer operation is taking so long that it has to be canceled, it usually means that the connection is already broken or some error occurred at server. In such situations, it's recommended to dispose the Sftp/Ftp object and connect & login again.
...