mirror of https://github.com/moparisthebest/curl
docs/libcurl: TCP_KEEPALIVE start and interval default to 60
Since the TCP keep-alive options were added in 705f0f7
the start and
interval default values have been 60, but that wasn't documented.
Bug: https://curl.haxx.se/mail/lib-2017-01/0000.html
Reported-by: Praveen Pvs
This commit is contained in:
parent
9b3fbf6b83
commit
4f2239c5ca
|
@ -32,7 +32,7 @@ Pass a long. Sets the \fIdelay\fP, in seconds, that the operating system will
|
||||||
wait while the connection is idle before sending keepalive probes. Not all
|
wait while the connection is idle before sending keepalive probes. Not all
|
||||||
operating systems support this option.
|
operating systems support this option.
|
||||||
.SH DEFAULT
|
.SH DEFAULT
|
||||||
?
|
60
|
||||||
.SH PROTOCOLS
|
.SH PROTOCOLS
|
||||||
All
|
All
|
||||||
.SH EXAMPLE
|
.SH EXAMPLE
|
||||||
|
|
|
@ -32,7 +32,9 @@ Pass a long. Sets the interval, in seconds, that the operating system will
|
||||||
wait between sending keepalive probes. Not all operating systems support this
|
wait between sending keepalive probes. Not all operating systems support this
|
||||||
option. (Added in 7.25.0)
|
option. (Added in 7.25.0)
|
||||||
.SH DEFAULT
|
.SH DEFAULT
|
||||||
|
60
|
||||||
.SH PROTOCOLS
|
.SH PROTOCOLS
|
||||||
|
All
|
||||||
.SH EXAMPLE
|
.SH EXAMPLE
|
||||||
.nf
|
.nf
|
||||||
CURL *curl = curl_easy_init();
|
CURL *curl = curl_easy_init();
|
||||||
|
@ -42,7 +44,7 @@ if(curl) {
|
||||||
/* enable TCP keep-alive for this transfer */
|
/* enable TCP keep-alive for this transfer */
|
||||||
curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L);
|
curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L);
|
||||||
|
|
||||||
/* keep-alive idle time to 120 seconds */
|
/* set keep-alive idle time to 120 seconds */
|
||||||
curl_easy_setopt(curl, CURLOPT_TCP_KEEPIDLE, 120L);
|
curl_easy_setopt(curl, CURLOPT_TCP_KEEPIDLE, 120L);
|
||||||
|
|
||||||
/* interval time between keep-alive probes: 60 seconds */
|
/* interval time between keep-alive probes: 60 seconds */
|
||||||
|
|
Loading…
Reference in New Issue