1CURLOPT_SERVER_RESPONSE_TIMEcOuUrTl(_3e)asy_setopt oCpUtRiLoOnPsT_SERVER_RESPONSE_TIMEOUT(3)
2
3
4

NAME

6       CURLOPT_SERVER_RESPONSE_TIMEOUT  -  time allowed to wait for server re‐
7       sponse
8

SYNOPSIS

10       #include <curl/curl.h>
11
12       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SERVER_RESPONSE_TIMEOUT,
13                                 long timeout);
14

DESCRIPTION

16       Pass a long.  Causes libcurl to set a timeout period  (in  seconds)  on
17       the  amount of time that the server is allowed to take in order to send
18       a response message for a command before the session is considered dead.
19       While  libcurl  is  waiting  for  a response, this value overrides CUR‐
20       LOPT_TIMEOUT(3). It is recommended that if  used  in  conjunction  with
21       CURLOPT_TIMEOUT(3),  you  set  CURLOPT_SERVER_RESPONSE_TIMEOUT(3)  to a
22       value smaller than CURLOPT_TIMEOUT(3).
23
24       This option was formerly known as CURLOPT_FTP_RESPONSE_TIMEOUT.
25

DEFAULT

27       None
28

PROTOCOLS

30       FTP, IMAP, POP3 and SMTP
31

EXAMPLE

33       CURL *curl = curl_easy_init();
34       if(curl) {
35         curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/slow.txt");
36         /* wait no more than 23 seconds */
37         curl_easy_setopt(curl, CURLOPT_SERVER_RESPONSE_TIMEOUT, 23L);
38         ret = curl_easy_perform(curl);
39
40         curl_easy_cleanup(curl);
41       }
42

AVAILABILITY

44       Added in 7.10.8. Used under this name since 7.20.0
45

RETURN VALUE

47       Returns CURLE_OK if supported, and CURLE_UNKNOWN_OPTION if not. Returns
48       CURLE_BAD_FUNCTION_ARGUMENT  if set to a negative value or a value that
49       when converted to milliseconds is too large.
50

SEE ALSO

52       CURLOPT_TIMEOUT(3),           CURLOPT_CONNECTTIMEOUT(3),           CUR‐
53       LOPT_LOW_SPEED_LIMIT(3),
54
55
56
57libcurl 7.85.0                   July 04, 202C2URLOPT_SERVER_RESPONSE_TIMEOUT(3)
Impressum