0 votes
by (390 points)

Using the solution I got here to upload file simultaneously. http://forum.rebex.net/5203/files-successfully-transferred-sftp-simultaneous-upload

In the array of task, how will I know which specific task encountered error?

Sftp sftp = new Sftp();
sftp.Connect(server);
sftp.Login(username, password);

Task[] tasks = new Task[2];
tasks[0] = sftp.PutFileAsync(@"c:\file.txt", ".");
tasks[1] = sftp.PutFileAsync(@"c:\file2.txt", ".");
tasks[2] = sftp.PutFileAsync(@"c:\file3.txt", ".");

Task.WaitAll(tasks);
sftp.Disconnect();

For above example, how will I know if which task encountered an error (error that does is not included in Rebex.IO.TransferProblemType)?

Applies to: Rebex SFTP

1 Answer

0 votes
by (58.9k points)
selected by
 
Best answer

I guess this has been already discussed at stackoverflow.

...