Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-61787

An easy way to limit upload/download bandwidth for QNetworkAccessManager

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • None
    • Core: I/O
    • None

    Description

      To have some context for my current headache:

      https://stackoverflow.com/questions/44906835/how-to-limit-the-upload-speed-of-an-application

      https://forum.qt.io/topic/80799/how-to-limit-upload-speed

      Basically, all I'm trying to do is limit the upload bandwidth of a QNetworkAccessManager. Given how simple this would be to do if I did all of the data transferring myself - just have a timer and send/read up to X bytes per second, done - and after having attempted to pull something off after a few days of trying, I came to a realization:
      This should be much, much simpler.

      There is setReadBufferSize for QAbstractSocket and QNetworkReply, but according to another bug report here, it doesn't really work that well. And besides, that is not an intuitive sounding name.

      Something as simple as a QNetworkAccessManager::setUpload/DownloadSpeedLimit(), or an equivalent for QIODevice would go a very long way.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            cnn Qt Core & Network
            thesheeep Jan Drabner
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes