1--- 2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3SPDX-License-Identifier: curl 4Title: CURLOPT_ACCEPTTIMEOUT_MS 5Section: 3 6Source: libcurl 7See-also: 8 - CURLOPT_CONNECTTIMEOUT_MS (3) 9 - CURLOPT_DEBUGFUNCTION (3) 10 - CURLOPT_STDERR (3) 11Protocol: 12 - FTP 13--- 14 15# NAME 16 17CURLOPT_ACCEPTTIMEOUT_MS - timeout waiting for FTP server to connect back 18 19# SYNOPSIS 20 21~~~c 22#include <curl/curl.h> 23 24CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ACCEPTTIMEOUT_MS, long ms); 25~~~ 26 27# DESCRIPTION 28 29Pass a long telling libcurl the maximum number of milliseconds to wait for a 30server to connect back to libcurl when an active FTP connection is used. 31 32# DEFAULT 33 3460000 milliseconds 35 36# EXAMPLE 37 38~~~c 39int main(void) 40{ 41 CURL *curl = curl_easy_init(); 42 if(curl) { 43 curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/path/file"); 44 45 /* wait no more than 5 seconds for FTP server responses */ 46 curl_easy_setopt(curl, CURLOPT_ACCEPTTIMEOUT_MS, 5000L); 47 48 curl_easy_perform(curl); 49 } 50} 51~~~ 52 53# AVAILABILITY 54 55Added in 7.24.0 56 57# RETURN VALUE 58 59Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. 60