From e8ab9a0d27a87bf0db730459a848644b74d7aa84 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 28 Sep 2012 15:50:18 +0200 Subject: FAQ: 5.16 I want a different time-out! --- docs/FAQ | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'docs/FAQ') diff --git a/docs/FAQ b/docs/FAQ index ccbf1f1d5..5e88fbbc5 100644 --- a/docs/FAQ +++ b/docs/FAQ @@ -97,6 +97,7 @@ FAQ 5.13 How do I stop an ongoing transfer? 5.14 Using C++ non-static functions for callbacks? 5.15 How do I get an FTP directory listing? + 5.16 I want a different time-out! 6. License Issues 6.1 I have a GPL program, can I use the libcurl library? @@ -1294,6 +1295,22 @@ FAQ libcurl since 7.21.0 also provide the ability to specify a wildcard to download multiple files from one FTP directory. + 5.16 I want a different time-out! + + Time and time again users realize that CURLOPT_TIMEOUT and + CURLOPT_CONNECTIMEOUT are not sufficiently advanced or flexible to cover all + the various use cases and scenarios applications end up with. + + libcurl offers many more ways to time-out operations. A common alternative + is to use the CURLOPT_LOW_SPEED_LIMIT and CURLOPT_LOW_SPEED_TIME options to + specify the lowest possible speed to accept before to consider the transfer + timed out. + + The most flexible way is by writing your own time-out logic and using + CURLOPT_PROGRESSFUNCTION (perhaps in combination with other callbacks) and + use that to figure out exactly when the right condition is met when the + transfer should get stopped. + 6. License Issues -- cgit v1.2.3