1CURLINFO_APPCONNECT_TIME_T(3)       libcurl      CURLINFO_APPCONNECT_TIME_T(3)
2
3
4

NAME

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

SYNOPSIS

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

DESCRIPTION

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

PROTOCOLS

28       All
29

EXAMPLE

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

AVAILABILITY

48       Added in 7.61.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_APPCONNECT_TIME(3)
56
57
58
59libcurl 8.2.1                   April 26, 2023   CURLINFO_APPCONNECT_TIME_T(3)
Impressum