mirror of
https://github.com/curl/curl.git
synced 2026-08-24 14:23:30 +03:00
tcpkeepalive: add CURLOPT_TCP_KEEPCNT and --keepalive-cnt
Closes #13885
This commit is contained in:
parent
02ff5d53a8
commit
b77d627d24
25 changed files with 210 additions and 20 deletions
|
|
@ -44,6 +44,9 @@ int main(void)
|
|||
/* interval time between keep-alive probes: 60 seconds */
|
||||
curl_easy_setopt(curl, CURLOPT_TCP_KEEPINTVL, 60L);
|
||||
|
||||
/* maximum number of keep-alive probes: 3 */
|
||||
curl_easy_setopt(curl, CURLOPT_TCP_KEEPCNT, 3L);
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://curl.se/");
|
||||
|
||||
res = curl_easy_perform(curl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue