On Wed, 20 Sep 2023, Matthias Klein via curl-library wrote:
What determines the block size libcurl uses to transfer the data?
libcurl uses dedicated buffers allocated for downloads and uploads. It even provides options for setting the sizes.
It will then always try to receive and send as much as possible so that the TCP stack gets a chance to work optimally. If the stack can't accept more than N bytes when sending, it will say that and curl will then keep the rest of the data in its buffer and pass it on again later at the first opportunity.
Is it possible to change the block size to see more frequent changes in the CURLOPT_XFERINFOFUNCTION callback?
If you use a smaller upload buffer perhaps, but that then also might hamper your ability to do fast uploads.
-- / daniel.haxx.se | Commercial curl support up to 24x7 is available! | Private help, bug fixes, support, ports, new features | https://curl.se/support.html -- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.html