Results 1 to 2 of 2

Thread: QNetworkReply & delayed readyRead(() signal

  1. #1
    Join Date
    Nov 2009
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QNetworkReply & delayed readyRead(() signal

    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!

  2. #2
    Join Date
    Oct 2009
    Posts
    37
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: QNetworkReply & delayed readyRead(() signal

    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?
    Disclaimer: Although I work on Qt for Nokia, anything I post here is personal

Similar Threads

  1. Replies: 1
    Last Post: 9th July 2009, 08:59
  2. pthread instead QThread
    By brevleq in forum Qt Programming
    Replies: 8
    Last Post: 23rd December 2008, 07:16
  3. Connection of custon signals/slots
    By brevleq in forum Qt Programming
    Replies: 2
    Last Post: 23rd December 2008, 07:04
  4. Replies: 1
    Last Post: 3rd December 2008, 15:51
  5. readyRead signal too slow or what?
    By Morea in forum Qt Programming
    Replies: 1
    Last Post: 6th July 2007, 19:11

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.