summaryrefslogtreecommitdiff
path: root/lib/setopt.c
diff options
context:
space:
mode:
authorMax Dymond <max.dymond@metaswitch.com>2018-04-18 16:40:17 +0100
committerDaniel Stenberg <daniel@haxx.se>2018-09-07 09:45:29 +0200
commit7b655fcbadffc3a0297466f1527e05d4a8efe6b2 (patch)
tree16c4b8253794cd6302822d2aef7baf86e3db3a81 /lib/setopt.c
parent6684653b682bae0be75ea62bb473b126923952f1 (diff)
downloadcurl-7b655fcbadffc3a0297466f1527e05d4a8efe6b2.tar.gz
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
Diffstat (limited to 'lib/setopt.c')
-rw-r--r--lib/setopt.c6
1 files changed, 6 insertions, 0 deletions
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;