summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2022-07-14 23:37:13 +0200
committerDaniel Stenberg <daniel@haxx.se>2022-07-17 23:27:55 +0200
commita88dbe410f702036b691199d4f20d310717b29eb (patch)
tree2035a7f897f9cd4542b3c0d3ab8b120f0b40a59a /docs
parent0e48ac1f99a370a8b378e8ca059525feb0bf74d3 (diff)
downloadcurl-a88dbe410f702036b691199d4f20d310717b29eb.tar.gz
curl_multi_timeout.3: clarify usage
Fixes #9155 Closes #9157 Reported-by: jvvprasad78 on github
Diffstat (limited to 'docs')
-rw-r--r--docs/libcurl/curl_multi_timeout.314
1 files changed, 8 insertions, 6 deletions
diff --git a/docs/libcurl/curl_multi_timeout.3 b/docs/libcurl/curl_multi_timeout.3
index 4406b3225..80ca42c67 100644
--- a/docs/libcurl/curl_multi_timeout.3
+++ b/docs/libcurl/curl_multi_timeout.3
@@ -45,9 +45,9 @@ The timeout value returned in the long \fBtimeout\fP points to, is in number
of milliseconds at this moment. If 0, it means you should proceed immediately
without waiting for anything. If it returns -1, there's no timeout at all set.
-An application that uses the multi_socket API SHOULD NOT use this function, but
-SHOULD instead use \fIcurl_multi_setopt(3)\fP and its
-\fPCURLMOPT_TIMERFUNCTION\fP option for proper and desired behavior.
+An application that uses the multi_socket API SHOULD NOT use this function,
+but SHOULD instead use the \fICURLMOPT_TIMERFUNCTION(3)\fP option for proper
+and desired behavior.
Note: if libcurl returns a -1 timeout here, it just means that libcurl
currently has no stored timeout value. You must not wait too long (more than a
@@ -69,9 +69,11 @@ timeout.tv_usec = (timeo % 1000) * 1000;
select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
.fi
.SH TYPICAL USAGE
-Call \fIcurl_multi_timeout(3)\fP, then wait for action on the sockets. You
-figure out which sockets to wait for by calling \fIcurl_multi_fdset(3)\fP or
-by a previous call to \fIcurl_multi_socket(3)\fP.
+Call \fIcurl_multi_timeout(3)\fP, then wait for action on the sockets. Figure
+out which sockets to wait for by calling \fIcurl_multi_fdset(3)\fP.
+
+When there is activity or timeout, call \fIcurl_multi_perform(3)\fP and then
+loop - until all transfers are complete.
.SH AVAILABILITY
This function was added in libcurl 7.15.4.
.SH RETURN VALUE