Results 1 to 7 of 7

Thread: Download via HTTP in several threads?

  1. #1
    Join Date
    Nov 2009
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default 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,

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Download via HTTP in several threads?

    How about using both QHttp & QThread?

  3. #3
    Join Date
    Nov 2009
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Download via HTTP in several threads?

    Quote Originally Posted by fatjuicymole View Post
    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,

  4. #4
    Join Date
    Oct 2009
    Posts
    37
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default 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)
    Disclaimer: Although I work on Qt for Nokia, anything I post here is personal

  5. #5
    Join Date
    Nov 2009
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Download via HTTP in several threads?

    Quote Originally Posted by mgoetz View Post
    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.

  6. #6
    Join Date
    Oct 2009
    Posts
    37
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default 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.
    Disclaimer: Although I work on Qt for Nokia, anything I post here is personal

  7. #7
    Join Date
    Nov 2009
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Download via HTTP in several threads?

    Quote Originally Posted by mgoetz View Post
    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?

Similar Threads

  1. Replies: 8
    Last Post: 27th March 2013, 11:51
  2. HTTP POST / Proxy Authentication issue
    By dekc99 in forum Qt Programming
    Replies: 2
    Last Post: 10th August 2011, 09:59
  3. Why do some QWidgets create own threads?
    By donglebob in forum Qt Programming
    Replies: 5
    Last Post: 6th July 2010, 17:01
  4. HTTP GET authentication does not proceed
    By SailingDreams in forum Qt Programming
    Replies: 2
    Last Post: 1st June 2009, 01:27

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.