From: Stefan Eissing Date: Sun, 23 Feb 2025 09:05:41 +0000 (+0100) Subject: CURLMOPT_SOCKETFUNCTION.md: add advice for socket callback invocation times X-Git-Tag: curl-8_13_0~378 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=51f8aa79a9f19ee0a3da1a787ff0ec095f5196eb;p=thirdparty%2Fcurl.git CURLMOPT_SOCKETFUNCTION.md: add advice for socket callback invocation times Explain when a registered socket callback may get invoked to make user better aware on how to handle it. Closes #16441 --- diff --git a/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.md b/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.md index 60c1185ea3..fae15d58a2 100644 --- a/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.md +++ b/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.md @@ -47,6 +47,11 @@ libcurl then expects the application to monitor the sockets for the specific activities and tell libcurl again when something happens on one of them. Tell libcurl by calling curl_multi_socket_action(3). +This callback may get invoked at any time when interacting with libcurl. +This may even happen after all transfers are done and is *likely* to +happen *during* a call to curl_multi_cleanup(3) when cached connections +are shut down. + # CALLBACK ARGUMENTS *easy* identifies the specific transfer for which this update is related.