curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Monitoring of sleeping connections

From: Daniel Stenberg via curl-library <curl-library_at_lists.haxx.se>
Date: Wed, 20 Sep 2023 10:14:28 +0200 (CEST)

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
Received on 2023-09-20