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.

Monitoring of sleeping connections

From: Matthias Klein via curl-library <curl-library_at_lists.haxx.se>
Date: Wed, 20 Sep 2023 06:15:59 +0000

Hi,

Context: We use libcurl 7.82.0 with OpenSSL/3.0.10 (Yocto kirkstone) on moving IoT devices to transfer data to the Internet.
In some cases we experience sleeping connections, but also slow transfer rates over cellular. (depending on location, provider, etc.).

Here we see libcurl transferring larger blocks of data at a time (into the network stack?).
It can take some time until the next large block is transferred.
This leads to the fact that we don't see any change in the variables dlnow or ulnow in the CURLOPT_XFERINFOFUNCTION callback for a long time.
(We continuously get XFERINFOFUNCTION calls with the same values).

We monitor the connections by checking for changes in the variables dlnow or ulnow in the CURLOPT_XFERINFOFUNCTION callback.
The two unknowns "connection speed" and "block size" make it difficult to implement a monitoring that hits in a timely manner.

What determines the block size libcurl uses to transfer the data?
Is it possible to change the block size to see more frequent changes in the CURLOPT_XFERINFOFUNCTION callback?

Best regards,
Matthias



-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2023-09-20