1CURLOPT_TCP_KEEPINTVL(3)   curl_easy_setopt options   CURLOPT_TCP_KEEPINTVL(3)
2
3
4

NAME

6       CURLOPT_TCP_KEEPINTVL - TCP keep-alive interval
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TCP_KEEPINTVL, long interval);
12

DESCRIPTION

14       Pass  a  long. Sets the interval, in seconds, that the operating system
15       will wait between sending keepalive probes. Not all  operating  systems
16       support this option. (Added in 7.25.0)
17

DEFAULT

19       60
20

PROTOCOLS

22       All
23

EXAMPLE

25       CURL *curl = curl_easy_init();
26       if(curl) {
27         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
28
29         /* enable TCP keep-alive for this transfer */
30         curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L);
31
32         /* set keep-alive idle time to 120 seconds */
33         curl_easy_setopt(curl, CURLOPT_TCP_KEEPIDLE, 120L);
34
35         /* interval time between keep-alive probes: 60 seconds */
36         curl_easy_setopt(curl, CURLOPT_TCP_KEEPINTVL, 60L);
37
38         curl_easy_perform(curl);
39       }
40

AVAILABILITY

42       Always
43

RETURN VALUE

45       Returns  CURLE_OK  if the option is supported, and CURLE_UNKNOWN_OPTION
46       if not.
47

SEE ALSO

49       CURLOPT_TCP_KEEPALIVE(3), CURLOPT_TCP_KEEPIDLE(3),
50
51
52
53libcurl 7.82.0                 November 26, 2021      CURLOPT_TCP_KEEPINTVL(3)
Impressum