From 306a47cea67f29a1c7a19a42de85e66acb03f1d7 Mon Sep 17 00:00:00 2001 From: Brad G <43330364+bakedpotat0@users.noreply.github.com> Date: Thu, 29 Nov 2018 12:17:21 -0600 Subject: connect: Add TCP Fast Open support for Windows This is the former PR #3327, saved by Johannes Schindelin, rebased, squashed and pushed again. Requires Windows 10 ver 1607 or newer --- lib/setopt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/setopt.c') diff --git a/lib/setopt.c b/lib/setopt.c index 27046768c..127d3385e 100644 --- a/lib/setopt.c +++ b/lib/setopt.c @@ -2547,7 +2547,12 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, case CURLOPT_TCP_FASTOPEN: #if defined(CONNECT_DATA_IDEMPOTENT) || defined(MSG_FASTOPEN) || \ defined(TCP_FASTOPEN_CONNECT) - data->set.tcp_fastopen = (0 != va_arg(param, long))?TRUE:FALSE; + data->set.tcp_fastopen = (0 != va_arg(param, long)) ? TRUE : FALSE; +#elif defined(HAVE_CONNECTEX) + if(Curl_ConnectEx != NULL) + data->set.tcp_fastopen = (0 != va_arg(param, long)) ? TRUE : FALSE; + else + result = CURLE_FAILED_INIT; #else result = CURLE_NOT_BUILT_IN; #endif -- cgit v1.2.1