1CURLOPT_ACCEPTTIMEOUT_MS(3)curl_easy_setopt optionsCURLOPT_ACCEPTTIMEOUT_MS(3)
2
3
4
6 CURLOPT_ACCEPTTIMEOUT_MS - timeout waiting for FTP server to connect
7 back
8
10 #include <curl/curl.h>
11
12 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ACCEPTTIMEOUT_MS, long ms);
13
15 Pass a long telling libcurl the maximum number of milliseconds to wait
16 for a server to connect back to libcurl when an active FTP connection
17 is used.
18
20 60000 milliseconds
21
23 FTP
24
26 CURL *curl = curl_easy_init();
27 if(curl) {
28 curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/path/file");
29
30 /* wait no more than 5 seconds for FTP server responses */
31 curl_easy_setopt(curl, CURLOPT_ACCEPTTIMEOUT_MS, 5000L);
32
33 curl_easy_perform(curl);
34 }
35
37 Added in 7.24.0
38
40 Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION
41 if not.
42
44 CURLOPT_STDERR(3), CURLOPT_DEBUGFUNCTION(3),
45
46
47
48libcurl 7.82.0 November 26, 2021 CURLOPT_ACCEPTTIMEOUT_MS(3)