I have an this code for download file but it's gives me slow performance rate.

Dim client As WebClient = New WebClient
client.Headers.Add("User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5")
client.Proxy = Nothing
client.DownloadFileAsync(New Uri(URL), cdirectory & ext)

How to split and merge one file for fast download?

有帮助吗?

解决方案

If you want to download a single file in multiple parts to improve performance then you will need to create an HttpWebRequest for each part and call its AddRange method to specify the range of bytes that you want that request to download. I've never done it myself so I have no example to provide but, if I wanted to do it, the first thing I'd do is read the MSDN documentation for the HttpWebRequest.AddRange method and then search the web for that same method.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top