Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
-
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.