Query: curlopt_tcp_keepalive
OS: mojave
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
CURLOPT_TCP_KEEPALIVE(3) curl_easy_setopt options CURLOPT_TCP_KEEPALIVE(3)NAMECURLOPT_TCP_KEEPALIVE - enable TCP keep-alive probingSYNOPSIS#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TCP_KEEPALIVE, long probe);DESCRIPTIONPass a long. If set to 1, TCP keepalive probes will be sent. The delay and frequency of these probes can be controlled by the CUR- LOPT_TCP_KEEPIDLE(3) and CURLOPT_TCP_KEEPINTVL(3) options, provided the operating system supports them. Set to 0 (default behavior) to dis- able keepalive probesDEFAULT0PROTOCOLSAllEXAMPLECURL *curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); /* enable TCP keep-alive for this transfer */ curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L); /* keep-alive idle time to 120 seconds */ curl_easy_setopt(curl, CURLOPT_TCP_KEEPIDLE, 120L); /* interval time between keep-alive probes: 60 seconds */ curl_easy_setopt(curl, CURLOPT_TCP_KEEPINTVL, 60L); curl_easy_perform(curl); }AVAILABILITYAdded in 7.25.0RETURN VALUEReturns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.SEE ALSOCURLOPT_TCP_KEEPIDLE(3), CURLOPT_TCP_KEEPINTVL(3), libcurl 7.54.0 February 03, 2016 CURLOPT_TCP_KEEPALIVE(3)
Related Man Pages |
---|
curlinfo_protocol(3) - mojave |
curlopt_connecttimeout_ms(3) - mojave |
curlopt_private(3) - mojave |
curlopt_tcp_keepalive(3) - mojave |
curlopt_tcp_keepintvl(3) - mojave |
Similar Topics in the Unix Linux Community |
---|
are you alive |
Syntax error /w curl? |
curl error trapping in ksh |
HELP - loop a curl command with different variables from input file |
Wget/curl and javascript |