summaryrefslogtreecommitdiff
path: root/lib/setopt.c
diff options
context:
space:
mode:
authorBrad G <43330364+bakedpotat0@users.noreply.github.com>2018-11-29 12:17:21 -0600
committerDaniel Stenberg <daniel@haxx.se>2018-12-16 18:46:01 +0100
commit306a47cea67f29a1c7a19a42de85e66acb03f1d7 (patch)
tree61ffad27ec4f7a2d4e155a64d2fa3ad37b9725b7 /lib/setopt.c
parent9e6518481cd4e2603b4f9e04d6cfd1a214a72726 (diff)
downloadcurl-TFO-windows.tar.gz
connect: Add TCP Fast Open support for WindowsTFO-windows
This is the former PR #3327, saved by Johannes Schindelin, rebased, squashed and pushed again. Requires Windows 10 ver 1607 or newer
Diffstat (limited to 'lib/setopt.c')
-rw-r--r--lib/setopt.c7
1 files changed, 6 insertions, 1 deletions
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