M
M
Michael2015-12-11 11:19:24
Computer networks
Michael, 2015-12-11 11:19:24

Is there a preloader library for C#?

Tell me, is there a ready-made library for C # where loading files with support for reloading is implemented?
We also need download speed properties, how much is left, and others ...
Something like this:
var downloadManager = new DownloadManager();
downloadManager.Load(fileFrom, fileTo);
Consloe.Write(downloadManager.DownloadSpeed ​​+ " - " + downloadManager.Downloaded);

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Vyacheslav Zolotov, 2015-12-11
@Sing303

read about http header Range.
The algorithm is simple:
1. Save the number of downloaded bytes somewhere
2. Stop the download
3. Correctly form the range header before resuming the download
4. Send a download request.
5. Profit!
PS. Is it worth a couple of lines of code to add a header to the library development time?

V
Vladimir Martyanov, 2015-12-11
@vilgeforce

Additional loading depends on the server, as far as I remember. And so curl.

M
MonkAlex, 2015-12-11
@MonkAlex

The standard webclient can notify about the download process, notify about the size of the already downloaded and the entire size, can download files taking into account authorization / cookies.
But in terms of reloading - I don’t know.

V
Vitaly Pukhov, 2015-12-11
@Neuroware

It’s not that it’s completely ready, but there is a self-made downloader, you can rip it into the necessary pieces, everything you need for resume functions is there + multi-threaded download is implemented, the source code can be downloaded here it was written as a competitor to download master, but as it turned out, it doesn’t download faster, exactly the same speed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question