1CURLINFO_APPCONNECT_TIME_T(3c)url_easy_getinfo optioCnUsRLINFO_APPCONNECT_TIME_T(3)
2
3
4

NAME

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

SYNOPSIS

10       #include <curl/curl.h>
11
12       CURLcode  curl_easy_getinfo(CURL  *handle,  CURLINFO_APPCONNECT_TIME_T,
13       curl_off_t *timep);
14

DESCRIPTION

16       Pass a pointer to a curl_off_t to receive the time, in microseconds, it
17       took from the start until the SSL/SSH connect/handshake to  the  remote
18       host  was  completed.   This  time  is  most  often  very  near  to the
19       CURLINFO_PRETRANSFER_TIME_T(3) time, except  for  cases  such  as  HTTP
20       pipelining  where  the  pretransfer time can be delayed due to waits in
21       line for the pipeline and more.
22
23       See also the TIMES overview in the curl_easy_getinfo(3) man page.
24

PROTOCOLS

26       All
27

EXAMPLE

29       curl = curl_easy_init();
30       if(curl) {
31         curl_off_t connect;
32         curl_easy_setopt(curl, CURLOPT_URL, url);
33         res = curl_easy_perform(curl);
34         if(CURLE_OK == res) {
35           res = curl_easy_getinfo(curl, CURLINFO_APPCONNECT_TIME_T, &connect);
36           if(CURLE_OK == res) {
37             printf("Time: %" CURL_FORMAT_CURL_OFF_T ".%06ld", connect / 1000000,
38                    (long)(connect % 1000000));
39           }
40         }
41         /* always cleanup */
42         curl_easy_cleanup(curl);
43       }
44

AVAILABILITY

46       Added in 7.61.0
47

RETURN VALUE

49       Returns CURLE_OK if the option is supported,  and  CURLE_UNKNOWN_OPTION
50       if not.
51

SEE ALSO

53       curl_easy_getinfo(3), curl_easy_setopt(3), CURLINFO_APPCONNECT_TIME(3)
54
55
56
57libcurl 7.64.0                   May 17, 2018    CURLINFO_APPCONNECT_TIME_T(3)
Impressum