Try { Uri URL; URL=new Uri (urlAddress); Sw. Start (); //starts the download WebClient. DownloadFileAsync (URL, location); } The catch (Exception ex) { MessageBox. Show (ex. Message); } } }
How to proceed with multi-threaded download
CodePudding user response:
Multithreading is not a very advanced technology, don't move, "multi-threaded"
Since you //starts the download WebClient. DownloadFileAsync (URL, location);
So wrote, so have to multithreaded senior??
For (I to 100) { DownloadFile (string urlAddress, string location)//do not??????? }
CodePudding user response:
Induction is a multi-threaded implementation, do you want to download file cut into several pieces at the same time? That you study what is breakpoint continuingly, then several Thread to execute the new line,
CodePudding user response:
https://mp.weixin.qq.com/s/MLMjJ7hW-Apr2JHyJ9CgZQ + multithreading, breakpoint continuingly multi-tasking download the example code, Principle is the request to the server through the Range of the RequestHeader specifies the data fragments,
CodePudding user response:
Do you want a file, multiple threads to download, or multiple files, multiple threads to download?