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
- alpine 3.23: curl-doc 8.23.0-r0 Β· curl
- alpine 3.24: curl-doc 8.23.0-r0 Β· curl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms