1CURLOPT_FTP_RESPONSE_TIMEOUTc(u3r)l_easy_setopt optiCoUnRsLOPT_FTP_RESPONSE_TIMEOUT(3)
2
3
4
6 CURLOPT_FTP_RESPONSE_TIMEOUT - time allowed to wait for FTP response
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_RESPONSE_TIMEOUT,
12 long timeout);
13
15 Pass a long. Causes libcurl to set a timeout period (in seconds) on
16 the amount of time that the server is allowed to take in order to send
17 a response message for a command before the session is considered dead.
18 While libcurl is waiting for a response, this value overrides CUR‐
19 LOPT_TIMEOUT(3). It is recommended that if used in conjunction with
20 CURLOPT_TIMEOUT(3), you set CURLOPT_FTP_RESPONSE_TIMEOUT(3) to a value
21 smaller than CURLOPT_TIMEOUT(3).
22
24 None
25
27 FTP
28
30 CURL *curl = curl_easy_init();
31 if(curl) {
32 curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/slow.txt");
33 /* wait no more than 23 seconds */
34 curl_easy_setopt(curl, CURLOPT_FTP_RESPONSE_TIMEOUT, 23L);
35 ret = curl_easy_perform(curl);
36
37 curl_easy_cleanup(curl);
38 }
39
41 Added in 7.10.8
42
44 Returns CURLE_OK if FTP is supported, and CURLE_UNKNOWN_OPTION if not.
45 Returns CURLE_BAD_FUNCTION_ARGUMENT if set to a negative value or a
46 value that when converted to milliseconds is too large.
47
49 CURLOPT_TIMEOUT(3), CURLOPT_CONNECTTIMEOUT(3), CUR‐
50 LOPT_LOW_SPEED_LIMIT(3),
51
52
53
54libcurl 7.66.0 October 03, 2017CURLOPT_FTP_RESPONSE_TIMEOUT(3)