AbortTransfer has an object parameter to help identify which operation to abort but I could not find any examples on how to use it. If I launch two BeginGetFile(s), how do I abort a specific one using AbortTransfer?

Regards,

Paul

asked 20 Jul '10, 17:39

Paul's gravatar image

Paul
16
accept rate: 0%

edited 10 Aug '10, 13:02

Rebex%20KB's gravatar image

Rebex KB ♦♦
256312


You have to pass some object as state argument to BeginGetFile(s) - then you can use the same object in the AbortTransfer call:

int state = 1; // any type can be used as 'state'
IAsyncResult ar = sftp.BeginGetFile("file.txt", "file.txt", 0, 0, -1, callback, state);
...

sftp.AbortTransfer(state);
link

answered 21 Jul '10, 08:53

Lukas%20Pokorny's gravatar image

Lukas Pokorny ♦♦
2.2k18
accept rate: 32%

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:

×115
×4
×3

Asked: 20 Jul '10, 17:39

Seen: 331 times

Last updated: 23 Mar '11, 00:22