Results 1 to 2 of 2

Thread: QNetworkAccessManager get signal on every separate chunk of data

  1. #1
    Join Date
    Sep 2012
    Posts
    3
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Exclamation QNetworkAccessManager get signal on every separate chunk of data

    Hi guys!

    I'm newby in Qt world and this is my first thread on the forum, so don't beat my hard if I'm making something wrong

    My question is: How I can get signal on every separate chunk when I'm receiving data from HTTP server using chunked encoding?

    E.g.

    For such pesponse:

    HTTP/1.1 200 OK
    Server: nginx/1.0.4
    Date: Thu, 06 Oct 2011 16:14:01 GMT
    Content-Type: text/html
    Transfer-Encoding: chunked
    Connection: keep-alive
    Vary: Accept-Encoding
    X-Powered-By: PHP/5.3.6

    25
    This is the data in the first chunk

    10
    and this is the second one
    0

    I want to get two separate signals with pointers to "This is the data in the first chunk" for first signal and "and this is the second one" for second one.

    Thanks in advance!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QNetworkAccessManager get signal on every separate chunk of data

    Parse the data as it comes in and find chunk boundaries yourself. QNetworkAccessManager won't do it for you.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QNetworkAccessManager no finished() signal emitted
    By realperson in forum Qt Programming
    Replies: 4
    Last Post: 18th January 2018, 08:42
  2. QTcpSocket reading by chunk
    By stef13013 in forum Qt Programming
    Replies: 1
    Last Post: 8th September 2012, 05:07
  3. Replies: 0
    Last Post: 18th May 2011, 09:18
  4. HTTP Post from QNetworkAccessManager - no data sent
    By secureboot in forum Qt Programming
    Replies: 1
    Last Post: 13th April 2011, 18:46
  5. QNetworkAccessManager does not signal finished
    By lukas.zachy in forum Newbie
    Replies: 5
    Last Post: 26th January 2011, 09:05

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.