Results 1 to 3 of 3

Thread: QTCPSocket - Download Speed

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QTCPSocket - Download Speed

    You should recalculate the speed each time you receive new data to provide better and better approximation of the average speed. How to approximate is up to you - you can either use the whole download history or only the recent part (i.e. last 10s of download). To store the statistics you can use a simple QMap<QTime,int> to store amounts of data downloaded during subsequent periods of time.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #2
    Join Date
    Jun 2008
    Location
    UK
    Posts
    35
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    1

    Default Re: QTCPSocket - Download Speed

    Thanks that makes sense, will go down that route.
    Last edited by tntcoda; 24th May 2009 at 16:15. Reason: updated contents

Similar Threads

  1. Reimplement QTcpSocket to limit download speed ???
    By THRESHE in forum Qt Programming
    Replies: 3
    Last Post: 29th November 2010, 14:30
  2. How to limit download speed with QHttp ?
    By THRESHE in forum Qt Programming
    Replies: 6
    Last Post: 25th November 2010, 11:55
  3. Challenging QTcpSocket reliability problem
    By Raccoon29 in forum Qt Programming
    Replies: 3
    Last Post: 13th January 2009, 10:38
  4. Strange QTcpSocket behavior (debugged with Ethereal)
    By mdecandia in forum Qt Programming
    Replies: 23
    Last Post: 28th May 2007, 20:44
  5. QTcpSocket speed problem
    By benelgiac in forum Qt Programming
    Replies: 4
    Last Post: 1st May 2007, 13:50

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
  •  
Qt is a trademark of The Qt Company.