Download via HTTP in several threads?
Hello,
can please anybody point me out to samples or API how to download a file via HTTP in several threads? Standard QHttp seems does not provide with such functionality.
Thanks,
Re: Download via HTTP in several threads?
How about using both QHttp & QThread?
Re: Download via HTTP in several threads?
Quote:
Originally Posted by
fatjuicymole
How about using both QHttp & QThread?
yes, this way is accepted but currently I cannot figure out to make it. Sample source is very appreciated.
Thanks,
Re: Download via HTTP in several threads?
What is your goal? If it is downloading multiple files at once, you can just use multiple QHttp objects.
(BTW, for Qt 4.6 you should use QNetworkAccessManager, which will download on 6 connections)
Re: Download via HTTP in several threads?
Quote:
Originally Posted by
mgoetz
What is your goal? If it is downloading multiple files at once, you can just use multiple QHttp objects.
(BTW, for Qt 4.6 you should use QNetworkAccessManager, which will download on 6 connections)
I want to download one file by chunks in several threads. Unfortunately Qt 4.6 is not acceptable in the task -- 4.5 only.
Re: Download via HTTP in several threads?
Still, there is no need for threads if the limiting factor is the speed the server gives you.
Threads only make sense if the _local_ parsing of the HTTP is too slow and you use your multiple cores to accelerate.
Re: Download via HTTP in several threads?
Quote:
Originally Posted by
mgoetz
Still, there is no need for threads if the limiting factor is the speed the server gives you.
Threads only make sense if the _local_ parsing of the HTTP is too slow and you use your multiple cores to accelerate.
I understand this :) and speed here is not the limiting factor. So any ideas what is the best way to solve this task?