GNURLOPT_ACCEPTTIMEOUT_MS(3)
π GNURLOPT_ACCEPTTIMEOUT_MS(3) π
okay so bestie, welcome to the GNURLOPT_ACCEPTTIMEOUT_MS(3) page β it lives in the curl_easy_setopt options manual, and it's here to explain one very specific FTP connect-back timeout. no cap, it's niche but iconic. π¦
β¨ NAME β¨
CURLOPT_ACCEPTTIMEOUT_MSβ timeout waiting for FTP server to connect back. literally what it says on the tin, bestie. π
πΈ SYNOPSIS πΈ
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ACCEPTTIMEOUT_MS, long ms);
π DESCRIPTION π
Pass a long telling libcurl the maximum number of milliseconds to wait for a server to connect back to libcurl when an active FTP connection is used. that's the whole vibe: you're handing libcurl a patience budget for the FTP server's little connect-back moment. β³β¨
π DEFAULT π
60000 milliseconds
six-zero-zero-zero-zero, bestie β the default patience is a whole minute. π«Ά
π¦ PROTOCOLS π¦
FTP
FTP only, periodt. no sneaky other protocols here. π
π EXAMPLE π
look at this lil' snippet, it's giving "set the timeout and go":
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/path/file");
/* wait no more than 5 seconds for FTP server responses */
curl_easy_setopt(curl, CURLOPT_ACCEPTTIMEOUT_MS, 5000L);
curl_easy_perform(curl);
}
π AVAILABILITY π
Added in 7.24.0 β this baddie landed back in the day. π
π RETURN VALUE π
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. slay when it works, and you know exactly which error you got when it doesn't. π
π«Ά SEE ALSO π«Ά
bye bestie π«Ά β this page is from libcurl 7.37.0, dated 19 Jun 2014. slay and happy FTPing π β¨
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms