summaryrefslogtreecommitdiff
path: root/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-12-02 13:57:38 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-12-06 14:55:52 +0100
commit2b3dd01b779e4eff623a735792a915cde914b74a (patch)
tree5c11c6cc0793b8df324316042bba7212eb338926 /docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3
parentb3f9c1aa09cbcdf6350d627f79f7d0e86cb178d3 (diff)
downloadcurl-2b3dd01b779e4eff623a735792a915cde914b74a.tar.gz
multi: handle errors returned from socket/timer callbacks
The callbacks were partially documented to support this. Now the behavior is documented and returning error from either of these callbacks will effectively kill all currently ongoing transfers. Added test 530 to verify Reported-by: Marcelo Juchem Fixes #8083 Closes #8089
Diffstat (limited to 'docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3')
-rw-r--r--docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.36
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3 b/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3
index 8efbce490..935d45554 100644
--- a/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3
+++ b/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -53,6 +53,10 @@ what activity on this socket the application is supposed to
monitor. Subsequent calls to this callback might update the \fBwhat\fP bits
for a socket that is already monitored.
+The socket callback should return 0 on success, and -1 on error. If this
+callback returns error, \fBall\fP transfers currently in progress in this
+multi handle will be aborted and fail.
+
\fBuserp\fP is set with \fICURLMOPT_SOCKETDATA(3)\fP.
\fBsocketp\fP is set with \fIcurl_multi_assign(3)\fP or will be NULL.