]> git.ipfire.org Git - thirdparty/curl.git/commit
multi: add notifications API
authorStefan Eissing <stefan@eissing.org>
Mon, 1 Sep 2025 09:58:16 +0000 (11:58 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 7 Oct 2025 08:55:31 +0000 (10:55 +0200)
commit357808f4addef44c2c48f17d067c114bc168a56d
treee87876935e2976bbd6b114b1893081234cf2ee59
parentf4e83a0adcc86abb9ecc8673e3abd91c215a6649
multi: add notifications API

Add infrastructure to colled and dispatch notifications for transfers
and the multi handle in general. Applications can register a callback
and en-/disable notification type the are interested in.

Without a callback installed, notifications are not collected. Same when
a notification type has not been enabled.

Memory allocation failures on adding notifications lead to a general
multi failure state and result in CURLM_OUT_OF_MEMORY returned from
curl_multi_perform() and curl_multi_socket*() invocations.

Closes #18432
24 files changed:
.github/scripts/spellcheck.curl
docs/libcurl/Makefile.inc
docs/libcurl/curl_multi_notify_disable.md [new file with mode: 0644]
docs/libcurl/curl_multi_notify_enable.md [new file with mode: 0644]
docs/libcurl/curl_multi_setopt.md
docs/libcurl/opts/CURLMOPT_NOTIFYDATA.md [new file with mode: 0644]
docs/libcurl/opts/CURLMOPT_NOTIFYFUNCTION.md [new file with mode: 0644]
docs/libcurl/opts/Makefile.inc
docs/libcurl/symbols-in-versions
include/curl/multi.h
include/curl/typecheck-gcc.h
lib/Makefile.inc
lib/libcurl.def
lib/multi.c
lib/multi_ntfy.c [new file with mode: 0644]
lib/multi_ntfy.h [new file with mode: 0644]
lib/multihandle.h
scripts/singleuse.pl
src/tool_operate.c
tests/data/test1135
tests/data/test3207
tests/data/test500
tests/http/testenv/curl.py
tests/unit/unit3214.c