QNetworkReply - how to set bandwidth limit properly ?
Hi, I'm trying to set speed limit in my application using QNetworkReply but my code doesn't work properly.
Code:
QNetworkReply* reply;
if(postData.isEmpty()) {
reply = m_manager->get(*this->generateRequest(url));
} else {
reply = m_manager->post(*this->generateRequest(url),postData);
}
if(Values().DOWNLOAD_SPEED_LIMIT && (this->m_name != "Updater")){
reply->setReadBufferSize(Values().DOWNLOAD_SPEED_LIMIT_VALUE);
}
I don't know why but for some reasons setReadBufferSize doesn't work, I need really simple solution...
Thanks for any help
Cheers
Re: QNetworkReply - how to set bandwidth limit properly ?
What does the read buffer size have to do with a speed limit?
The read buffer size is, as indicated by its name, the size of the buffer used for incoming data.
The amount of data read from the operating system's buffer into the application's memory.
Cheers,
_