[Interest] Get intermediate data during http get

Christophe Thomas oxygen77.ct at gmail.com
Fri Jan 19 15:34:37 CET 2024


Hello,

I’m currently adding support for a satellite connexion which gives me an
internet access thru a wifi link to an existing app that is coded using Qt
5.

The goal is to download a file from different servers that I don’t always
manage using http get requests.

As the link is slow and subject to disconnect I’m reading data as soon as
the Qt lib makes it available (at each readyread I get)

I’m also looking at the tcp packet in wireshark.

Depending on the serveur/file I see that I can get the data in my app as it
arrives (=each tcp packet) or only after the last packet.

As explained above I wan’t to change this so I get data after each packet
(or at least more often) so I can save it and restart using the RANGE
header in case of link failure.

I was using initially a QNetworkManager logic, I also switched to a
QTcpSocket and manually implement a simple http class. My goal was to gain
access to some of the « low level » socket option like the buffer read size.

All my tests were not concluding for now and I’m still  having the full
content after the last packet.

Using a tcp socket I noticed that I have first readyread that passes me the
http header from the first packet and then waits the end of the tcp flow to
gives me the full body/data part. When modifify the socket read buffer size
it is only modifying the available data between readyread.

 I'm still not sure if this is due to windows network stack or is it
related to Qt.

Any idea what is causing this or where to search ?

Kind regards,

Christophe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20240119/29897361/attachment.htm>


More information about the Interest mailing list