1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Title: CURLOPT_SSL_FALSESTART
5Section: 3
6Source: libcurl
7See-also:
8  - CURLOPT_TCP_FASTOPEN (3)
9Protocol:
10  - TLS
11TLS-backend:
12  - Secure Transport
13---
14
15# NAME
16
17CURLOPT_SSL_FALSESTART - TLS false start
18
19# SYNOPSIS
20
21~~~c
22#include <curl/curl.h>
23
24CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_FALSESTART, long enable);
25~~~
26
27# DESCRIPTION
28
29Pass a long as parameter set to 1L to enable or 0 to disable.
30
31This option determines whether libcurl should use false start during the TLS
32handshake. False start is a mode where a TLS client starts sending application
33data before verifying the server's Finished message, thus saving a round trip
34when performing a full handshake.
35
36# DEFAULT
37
380
39
40# EXAMPLE
41
42~~~c
43int main(void)
44{
45  CURL *curl = curl_easy_init();
46  if(curl) {
47    curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
48    curl_easy_setopt(curl, CURLOPT_SSL_FALSESTART, 1L);
49    curl_easy_perform(curl);
50  }
51}
52~~~
53
54# AVAILABILITY
55
56Added in 7.42.0. This option is currently only supported by the Secure
57Transport (on iOS 7.0 or later, or OS X 10.9 or later) TLS backend.
58
59# RETURN VALUE
60
61Returns CURLE_OK if false start is supported by the SSL backend, otherwise
62returns CURLE_NOT_BUILT_IN.
63