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       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         curl_off_t 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_T, &connect);
39           if(CURLE_OK == res) {
40             printf("Time: %" CURL_FORMAT_CURL_OFF_T ".%06ld", connect / 1000000,
41                    (long)(connect % 1000000));
42           }
43         }
44         /* always cleanup */
45         curl_easy_cleanup(curl);
46       }
47

AVAILABILITY

49       Added in 7.61.0
50

RETURN VALUE

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

SEE ALSO

56       curl_easy_getinfo(3), curl_easy_setopt(3), CURLINFO_APPCONNECT_TIME(3)
57
58
59
60libcurl 7.76.1                 November 04, 2020 CURLINFO_APPCONNECT_TIME_T(3)
Impressum