CURLMINFO_XFERS_CURRENT(3)

πŸ’… CURLMINFO_XFERS_CURRENT(3) πŸ’…

okay so real quick bestie β€” this is a page from the Library Functions Manual, and it's all about CURLMINFO_XFERS_CURRENT, aka "how many easy handles are currently chillin' in my multi handle". let's get into it 🫢


✨ NAME ✨

CURLMINFO_XFERS_CURRENT β€” the number of easy handles that are currently added, fr fr


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <curl/curl.h>

CURLMcode curl_multi_get_offt(CURLM *handle, CURLMINFO_XFERS_CURRENT,
                              curl_off_t *pvalue);

🌸 DESCRIPTION 🌸

So this one returns the number of easy handles that are currently added to the multi handle. Like, right now. Present tense. main character energy ✨

  • It does not count handles that have already been removed β€” those are gone, bestie, we don't talk about them πŸ’€
  • It does count internal handles that get added for tasks (like resolving via DoH, for example). yes, the behind-the-scenes ones count too πŸ‘‘

If you want the total number of easy handles ever added to the multi, that's a different vibe entirely β€” go check CURLMINFO_XFERS_ADDED(3) πŸŽ€


πŸ“ DEFAULT πŸ“

n/a

like, there's literally nothing to default to here πŸ™ˆ


🌈 PROTOCOLS 🌈

This functionality affects all supported protocols. every single one. no cap πŸ’…


⭐ EXAMPLE ⭐

int main(void)
{
  CURLM *m = curl_multi_init();
  curl_off_t value;

  curl_multi_get_offt(m, CURLMINFO_XFERS_CURRENT, &value);
}

look at that. iconic. not a single wasted line πŸ”₯


🧚 AVAILABILITY 🧚

Added in curl 8.16.0 β€” so if you're on anything older, she's not there yet, sorry bestie 😭


πŸ’œ RETURN VALUE πŸ’œ

curl_multi_get_offt(3) returns a CURLMcode indicating success or error.

  • CURLM_OK (0) means everything was OK β€” slay πŸŽ‰
  • non-zero means an error occurred β€” and you can go look it up in libcurl-errors(3) to find out what went wrong πŸ”

πŸ‘‘ SEE ALSO πŸ‘‘

go read those too, they're the sibling pages and they also ate πŸ’–


mwah, that's the whole page 🫢 this lil doc is brought to you by libcurl, dated 2026-10-25 β€” stay hydrated, close your file descriptors, and remember: internal handles count too ✨

πŸ“¦ where this page comes from