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
This commit is contained in:
Stefan Eissing 2025-09-01 11:58:16 +02:00 committed by Daniel Stenberg
parent f4e83a0adc
commit 357808f4ad
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
24 changed files with 767 additions and 44 deletions

View file

@ -116,6 +116,8 @@ my %api = (
'curl_multi_get_offt' => 'API',
'curl_multi_info_read' => 'API',
'curl_multi_init' => 'API',
'curl_multi_notify_disable' => 'API',
'curl_multi_notify_enable' => 'API',
'curl_multi_perform' => 'API',
'curl_multi_remove_handle' => 'API',
'curl_multi_setopt' => 'API',