CURLOPT_ACCEPTTIMEOUT_MS(3)
π CURLOPT_ACCEPTTIMEOUT_MS(3) π
okay so bestie, this page is from the Library Functions Manual and it's all about CURLOPT_ACCEPTTIMEOUT_MS β long name, iconic behavior, lowkey niche. no cap. π
β¨ NAME β¨
CURLOPT_ACCEPTTIMEOUT_MS β timeout waiting for FTP server to connect back. It's giving "how long do we wait for the server to text back" energy, but make it FTP. π«Ά
π οΈ SYNOPSIS π οΈ
#include <curl/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. With active FTP, the client (that's libcurl) tells the server to do a TCP connect back to the client, instead of vice versa for passive FTP. The way that libcurl is out here making the server call it back? main character energy, honestly. π
This option has no purpose for passive FTP. Not me looking for relevance where there is none. π
π DEFAULT π
60000 milliseconds
π¦ PROTOCOLS π¦
This functionality affects ftp only. fr fr, vibe check passed: FTP only, periodt. π¦
π₯ EXAMPLE π₯
int main(void)
{
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 the FTP server to connect */
curl_easy_setopt(curl, CURLOPT_ACCEPTTIMEOUT_MS, 5000L);
curl_easy_perform(curl);
}
}
β AVAILABILITY β
Added in curl 7.24.0. so she's been around, okay? vintage but still serving. π
π RETURN VALUE π
curl_easy_setopt(3) returns a CURLcode indicating success or error.
CURLE_OK (0) means everything was OK, non-zero means an error occurred, see libcurl-errors(3). That's the whole vibe: 0 is slay, non-zero is highkey "bestie something went off". π
π SEE ALSO π
xoxo, later bestie β this was CURLOPT_ACCEPTTIMEOUT_MS(3) from libcurl, dated 2026-10-12. mwah π
π¦ where this page comes from
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms