summaryrefslogtreecommitdiff
path: root/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3
diff options
context:
space:
mode:
Diffstat (limited to 'docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3')
-rw-r--r--docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.322
1 files changed, 13 insertions, 9 deletions
diff --git a/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3 b/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3
index 4498c2460..77f2f4870 100644
--- a/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3
+++ b/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3
@@ -5,11 +5,11 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * 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
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
.\" *
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
.\" * copies of the Software, and permit persons to whom the Software is
@@ -20,10 +20,10 @@
.\" *
.\" **************************************************************************
.\"
-.TH CURLMOPT_TIMERFUNCTION 3 "May 03, 2019" "libcurl 7.73.0" "curl_multi_setopt options"
+.TH CURLMOPT_TIMERFUNCTION 3 "December 02, 2021" "libcurl 7.81.0" "curl_multi_setopt options"
.SH NAME
-CURLMOPT_TIMERFUNCTION \- set callback to receive timeout values
+CURLMOPT_TIMERFUNCTION \- callback to receive timeout values
.SH SYNOPSIS
.nf
#include <curl/curl.h>
@@ -41,9 +41,9 @@ Certain features, such as timeouts and retries, require you to call libcurl
even when there is no activity on the file descriptors.
Your callback function \fBtimer_callback\fP should install a non-repeating
-timer with an interval of \fBtimeout_ms\fP. When time that timer fires, call
-either \fIcurl_multi_socket_action(3)\fP or \fIcurl_multi_perform(3)\fP,
-depending on which interface you use.
+timer with an expire time of \fBtimeout_ms\fP milliseconds. When that timer
+fires, call either \fIcurl_multi_socket_action(3)\fP or
+\fIcurl_multi_perform(3)\fP, depending on which interface you use.
A \fBtimeout_ms\fP value of -1 passed to this callback means you should delete
the timer. All other values are valid expire times in number of milliseconds.
@@ -53,8 +53,12 @@ changed.
The \fBuserp\fP pointer is set with \fICURLMOPT_TIMERDATA(3)\fP.
-The timer callback should return 0 on success, and -1 on error. This callback
-can be used instead of, or in addition to, \fIcurl_multi_timeout(3)\fP.
+The timer 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.
+
+This callback can be used instead of, or in addition to,
+\fIcurl_multi_timeout(3)\fP.
\fBWARNING:\fP even if it feels tempting, avoid calling libcurl directly from
within the callback itself when the \fBtimeout_ms\fP value is zero, since it