Async GetFile

Advertisement

nighttrain
Joined:
Posts:
4
Location:
Poland

Async GetFile

Does WinScp has async methods? So far i do not see.

If not, did anyone tested it like putting OpenSession->GetFile-CloseSession into (C#)Task.Run ? Will it work fine with multiple task like that?

Edit:
I found this link doco: https://winscp.net/eng/docs/library_example_parallel_transfers
Question: why in dl you created one session for all Tasks but for upload you creating separated session in each task. is there really a diffrence?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,263
Location:
Prague, Czechia

Re: Async GetFile

There are no asynchronous methods in WinSCP .NET assembly.
You can use multiple instances of Session class in separate threads/tasks.
In the examples, there is a separate Session for each thread/task for both download (downloadSession) and upload (uploadSession). Please check the code again.

Reply with quote

Advertisement

You can post new topics in this forum