From 7b655fcbadffc3a0297466f1527e05d4a8efe6b2 Mon Sep 17 00:00:00 2001 From: Max Dymond Date: Wed, 18 Apr 2018 16:40:17 +0100 Subject: upkeep: add a connection upkeep API: curl_easy_conn_upkeep() Add functionality so that protocols can do custom keepalive on their connections, when an external API function is called. Add docs for the new options in 7.62.0 Closes #1641 --- lib/setopt.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/setopt.c') diff --git a/lib/setopt.c b/lib/setopt.c index 4a71f9ae4..13c7da960 100644 --- a/lib/setopt.c +++ b/lib/setopt.c @@ -2624,6 +2624,12 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_arg(param, char *)); data->set.doh = data->set.str[STRING_DOH]?TRUE:FALSE; break; + case CURLOPT_CONN_UPKEEP_INTERVAL_MS: + arg = va_arg(param, long); + if(arg < 0) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.upkeep_interval_ms = arg; + break; default: /* unknown tag and its companion, just ignore: */ result = CURLE_UNKNOWN_OPTION; -- cgit v1.2.3