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?

asked 02 Aug '10, 14:41

_FRED_'s gravatar image

_FRED_
907
accept rate: 0%


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.

link

answered 02 Aug '10, 16:52

Martin%20Vobr's gravatar image

Martin Vobr ♦♦
335310
accept rate: 37%

edited 03 Aug '10, 09:31

Thanks! How I can abort async connect/login operations for Ftp and any "non-transfer operation" for Sftp?

(03 Aug '10, 10:16) _FRED_
1

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.

(03 Aug '10, 14:11) Martin Vobr ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×136
×115
×4

Asked: 02 Aug '10, 14:41

Seen: 722 times

Last updated: 03 Aug '10, 09:31