PDA

View Full Version : QNetworkReply & delayed readyRead(() signal



dmini
6th November 2009, 00:07
Hi,

I'm trying to download data via HTTP using QNetworkAccessManager from a slow streaming server (few bytes a minute) and it turns out that once the request is sent the readyRead() or downloadProgress() signals don't get fired until ~1024 bytes of data gets buffered so with slow stream of data it may take significant amount of time. After this initial delay streaming continues just fine and there's no delay. I tried calling setReadBufferSize(100) on QNetworkReply but it doesn't seem to have any effect. Also tried to set a timer and check if QNetworkReply has data from timeout() slot but again QNetworkReply doesn't have any data until initial buffer fill is completed.

Is there a trick to instruct QNetworkAccessManager and underlying QTcpSocket to return data as soon as possible regardless of how few bytes have been received from the socket?

I'd appreciate any help or suggestion...

Thank you!

mgoetz
6th November 2009, 14:47
So you are using HTTP and not HTTPS?

Did you verify with another client (e.g. by manually telnetting into the HTTP server on the HTTP port and "speaking" HTTP manually?) that the problem is really on the receiver side and not the server buffering data before sending?