Answer the question
In order to leave comments, you need to log in
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
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?
Additional loading depends on the server, as far as I remember. And so curl.
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.
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 questionAsk a Question
731 491 924 answers to any question