CURLOPT_ACCEPTTIMEOUT_MS.3 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. .\" generated by cd2nroff 0.1 from CURLOPT_ACCEPTTIMEOUT_MS.md
  2. .TH CURLOPT_ACCEPTTIMEOUT_MS 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLOPT_ACCEPTTIMEOUT_MS \- timeout waiting for FTP server to connect back
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ACCEPTTIMEOUT_MS, long ms);
  9. .fi
  10. .SH DESCRIPTION
  11. Pass a long telling libcurl the maximum number of milliseconds to wait for a
  12. server to connect back to libcurl when an active FTP connection is used.
  13. .SH DEFAULT
  14. 60000 milliseconds
  15. .SH PROTOCOLS
  16. This functionality affects ftp only
  17. .SH EXAMPLE
  18. .nf
  19. int main(void)
  20. {
  21. CURL *curl = curl_easy_init();
  22. if(curl) {
  23. curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/path/file");
  24. /* wait no more than 5 seconds for FTP server responses */
  25. curl_easy_setopt(curl, CURLOPT_ACCEPTTIMEOUT_MS, 5000L);
  26. curl_easy_perform(curl);
  27. }
  28. }
  29. .fi
  30. .SH AVAILABILITY
  31. Added in curl 7.24.0
  32. .SH RETURN VALUE
  33. Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
  34. .SH SEE ALSO
  35. .BR CURLOPT_CONNECTTIMEOUT_MS (3),
  36. .BR CURLOPT_DEBUGFUNCTION (3),
  37. .BR CURLOPT_STDERR (3)