开发者

How to download by block with Qt?

开发者 https://www.devze.com 2023-01-14 10:23 出处:网络
For many reasons i need to download file by piece of 1024 byte. I find nothing in QnetworkAccessMan开发者_运维问答ager.

For many reasons i need to download file by piece of 1024 byte.

I find nothing in QnetworkAccessMan开发者_运维问答ager. I can not use the "header technic" because my server don't support it.

I call header technic, the tecnic who send stuff like "Content-Range: bytes 21010-47000/47022" in the header of http request


Use a QTcpSocket instead and call QTcpSocket::setReadBufferSize() with an appropriate value. Then you won't be able to read bigger chunks than the size of the buffer you set.

0

精彩评论

暂无评论...
验证码 换一张
取 消