title: bandwidth throttling with Qt
body: <p>I'm using the QNetworkAccessManager to download files from the web, it provides an easy API to the task. But I wish to add a download rate limit to the class, so all http replies won't exceed that limit (I see no reason to limit the requests).</p>
  
  <p>I've googled abit and found an interesting post <a href="http://doc.trolltech.com/qq/qq17-ratecontrol.html" rel="nofollow noreferrer">here</a>. But what it does is subclass QTcpSocket and gives control over the bandwidth using a separate class that manages a set of sockets. While this is nice I want to continue using the QNetworkAcessManager class. </p>
  
  <p>The way I see it I could:</p>
  
  <ol>
  <li>subclass QNetworkAccessManager and integrate the subclassed QTcpSocket somehow (this might involve subclassing even more classes, the QHttp* ones).</li>
  <li>use the classes offered in the article and build my own QNetworkAccessManager around those.</li>
  <li>the QNetworkAccessManager allows the use of a proxy. I could write a fake proxy class that will have the bandwidth throttling logic in it. But this seems like an ugly hack to me.</li>
  </ol>
  
  <p>While the first 2 options are possible, I was wondering if there's an easier way to do this? If not which one would you suggest?</p>