CURL_MULTI_NOTIFY_ENABLE(3)

πŸ’… curl_multi_notify_enable β€” bestie, let's turn on a notification type ✨

okay so this is a libcurl manpage, it lives in the Library Functions Manual, and it's literally about flipping a notification switch ON in your multi handle. no cap, that's the whole vibe. πŸŽ€


🌸 NAME 🌸

curl_multi_notify_enable β€” enables a notification type (yes queen, that's it, that's the function)


✨ SYNOPSIS ✨

#include <curl/curl.h>
CURLMcode curl_multi_notify_enable(CURLM *multi_handle,
                                   unsigned int notification);

okay so you're passing in your multi handle and the notification type you want turned on. iconique. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea β˜•: this function enables collecting the given notification type in the multi handle. When this notification happens, a callback function that you installed via CURLMOPT_NOTIFYFUNCTION(3) gets called. slay.

But β€” and this is the important part, bestie, listen up β€” it's a two-step deal. Only when a notification callback is installed AND a notification is enabled are these collected and dispatched to the callback. Both. At the same time. It's giving main character energy, not solo energy. 🫢

You can have several notification types enabled at the same time, no drama. And enabling an already enabled notification is not an error β€” it's just like, cool, already on, love that for you. πŸ’–

And if you ever want to turn it back off, you can disable a notification again via curl_multi_notify_disable(3). periodt.


🌈 PROTOCOLS 🌈

This functionality affects all supported protocols β€” every single one, fr fr. πŸ”₯


πŸ“ EXAMPLE πŸ“

int main(void)
{
  int rc;
  CURLM *multi = curl_multi_init();

  rc = curl_multi_notify_enable(multi, CURLMNOTIFY_INFO_READ);
}

look at her go πŸ˜­πŸ’–


⭐ AVAILABILITY ⭐

Added in curl 8.17.0 β€” so if you're on an older curl, ngl, you're out of luck. update bestie. 🧚


πŸ‘‘ RETURN VALUE πŸ‘‘

This function returns a CURLMcode indicating success or error.

CURLM_OK (0) means everything was OK. Non-zero means an error occurred, so go check libcurl-errors(3) β€” iykyk.

And this is lowkey important: the return code is for the whole multi stack. Problems still might have occurred on individual transfers even when one of these functions return OK. so like, don't @ me if one transfer is being messy, the stack-level code can still be fine. πŸ’€


πŸ’œ SEE ALSO πŸ’œ

go read those too, bestie, they're all in the same group chat 🫢


with love from the libcurl girlies, dated 2026-10-25, version vibes of libcurl, page title curl_multi_notify_enable(3) β€” mwah πŸ’‹

πŸ“¦ where this page comes from