1CURLOPT_TCP_KEEPINTVL(3)            libcurl           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
18       The  maximum value this accepts is 2147483648. Any larger value will be
19       capped to this amount.
20

DEFAULT

22       60
23

PROTOCOLS

25       All
26

EXAMPLE

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

AVAILABILITY

45       Always
46

RETURN VALUE

48       Returns CURLE_OK if the option is supported,  and  CURLE_UNKNOWN_OPTION
49       if not.
50

SEE ALSO

52       CURLOPT_TCP_KEEPALIVE(3), CURLOPT_TCP_KEEPIDLE(3),
53
54
55
56ibcurl 8.2.1                    April 26, 2023        CURLOPT_TCP_KEEPINTVL(3)
Impressum