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 in‐
12       terval);
13

DESCRIPTION

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

DEFAULT

20       60
21

PROTOCOLS

23       All
24

EXAMPLE

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

AVAILABILITY

43       Always
44

RETURN VALUE

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

SEE ALSO

50       CURLOPT_TCP_KEEPALIVE(3), CURLOPT_TCP_KEEPIDLE(3),
51
52
53
54libcurl 7.79.1                September 08, 2021      CURLOPT_TCP_KEEPINTVL(3)
Impressum