curl_multi_get_offt(3)

πŸŽ€ curl_multi_get_offt(3) β€” the multi-handle tea-spiller ✨

okay hi bestie 🫢 so this is a libcurl manpage, and honestly it's short and sweet β€” the whole vibe is "imma peek inside your multi handle and tell you a number." no cap, that's it. let's get into it πŸ’…


✨ NAME ✨

curl_multi_get_offt β€” extract information from a multi handle πŸ”


🌸 SYNOPSIS 🌸

#include <curl/curl.h>

CURLMcode curl_multi_get_offt(CURLM *multi_handle,
                              CURLMinfo_offt info,
                              curl_off_t *pvalue);

πŸ¦‹ DESCRIPTION πŸ¦‹

Get the info kept in the multi handle πŸ’–. Like, you hand it a multi_handle, you tell it which info you're curious about, and it drops the answer into pvalue.

but listen πŸ‘€ β€” if the info is not applicable, this function returns CURLM_UNKNOWN_OPTION. so if you get that back, it's not a skill issue on your end, that info just doesn't apply here 😭


πŸ‘‘ OPTIONS πŸ‘‘

the following information can be extracted ✨ (this is the menu, bestie β€” pick one):


🌈 PROTOCOLS 🌈

This functionality affects all supported protocols β€” every single one, no gatekeeping πŸ™Œ


πŸ“ EXAMPLE πŸ“

int main(void)
{
  /* init a multi stack */
  CURLM *multi = curl_multi_init();
  CURL *curl = curl_easy_init();
  curl_off_t n;

  if(curl) {
    /* add the transfer */
    curl_multi_add_handle(multi, curl);

    curl_multi_get_offt(multi, CURLMINFO_XFERS_ADDED, &n);
    /* on successful add, n is 1 */
  }
}

see how clean that is?? n comes back as 1 on a successful add, like slay πŸŽ€


⭐ AVAILABILITY ⭐

Added in curl 8.16.0 β€” so if you're on something older, this icon is simply not available to you yet, my condolences πŸ’€


πŸ’œ RETURN VALUE πŸ’œ

This function returns a CURLMcode indicating success or error ✨

CURLM_OK (0) means everything was OK πŸ₯³ β€” non-zero means an error occurred, see libcurl-errors(3) for the whole lore πŸ™ˆ


🧚 SEE ALSO 🧚


bestie reminder πŸ’…: CURLM_UNKNOWN_OPTION is a real answer, not a bug. if the info isn't applicable, that's just what you get, fr fr 🫢

k that's the whole page!! mwah πŸ’– this lil cutie is from libcurl, dated 2026-10-25 β€” go forth and get your offt values, you absolute main character πŸ‘‘βœ¨

πŸ“¦ where this page comes from