1CURLINFO_APPCONNECT_TIME(3)curl_easy_getinfo optionsCURLINFO_APPCONNECT_TIME(3)
2
3
4

NAME

6       CURLINFO_APPCONNECT_TIME  - get the time until the SSL/SSH handshake is
7       completed
8

SYNOPSIS

10       #include <curl/curl.h>
11
12       CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_APPCONNECT_TIME, dou‐
13       ble *timep);
14

DESCRIPTION

16       Pass  a  pointer  to  a double to receive the time, in seconds, it took
17       from the start until the SSL/SSH connect/handshake to the  remote  host
18       was  completed.  This time is most often very near to the CURLINFO_PRE‐
19       TRANSFER_TIME(3) time, except for cases such as HTTP  pipelining  where
20       the  pretransfer time can be delayed due to waits in line for the pipe‐
21       line and more.
22
23       When a redirect is followed, the time from each request  is  added  to‐
24       gether.
25
26       See also the TIMES overview in the curl_easy_getinfo(3) man page.
27

PROTOCOLS

29       All
30

EXAMPLE

32       curl = curl_easy_init();
33       if(curl) {
34         double connect;
35         curl_easy_setopt(curl, CURLOPT_URL, url);
36         res = curl_easy_perform(curl);
37         if(CURLE_OK == res) {
38           res = curl_easy_getinfo(curl, CURLINFO_APPCONNECT_TIME, &connect);
39           if(CURLE_OK == res) {
40             printf("Time: %.1f", connect);
41           }
42         }
43         /* always cleanup */
44         curl_easy_cleanup(curl);
45       }
46

AVAILABILITY

48       Added in 7.19.0
49

RETURN VALUE

51       Returns  CURLE_OK  if the option is supported, and CURLE_UNKNOWN_OPTION
52       if not.
53

SEE ALSO

55       curl_easy_getinfo(3),       curl_easy_setopt(3),       CURLINFO_APPCON‐
56       NECT_TIME_T(3)
57
58
59
60libcurl 7.76.1                 November 04, 2020   CURLINFO_APPCONNECT_TIME(3)
Impressum