GNURLINFO...ECT_TIME_T(3)

πŸ“¦ version 7.72.0, in nixos 26.05, nixpkgs unstable

πŸ’… GNURLINFO...ECT_TIME_T(3) πŸ’…

okay so bestie, this page is the CURLINFO_APPCONNECT_TIME_T entry in the curl_easy_getinfo options manual, and it's literally here to explain how you get the time until the SSL/SSH handshake is completed ✨


🌸 NAME 🌸

CURLINFO_APPCONNECT_TIME_T β€” get the time until the SSL/SSH handshake is completed 🫢


✨ SYNOPSIS ✨

#include <gnurl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_APPCONNECT_TIME_T,
curl_off_t *timep);

πŸ¦‹ DESCRIPTION πŸ¦‹

Pass a pointer to a curl_off_t to receive the time, in microseconds, that it took from the start until the SSL/SSH connect/handshake to the remote host was completed πŸ’–

This time is most often very near to the CURLINFO_PRETRANSFER_TIME_T(3) time β€” except for cases such as HTTP pipelining, where the pretransfer time can be delayed due to waits in line for the pipeline and more 😭

When a redirect is followed, the time from each request is added together, no cap 🧚

See also the TIMES overview in the curl_easy_getinfo(3) man page πŸ‘‘


🌈 PROTOCOLS 🌈

All πŸ’«


πŸŽ€ EXAMPLE πŸŽ€

       curl = curl_easy_init();
       if(curl) {
         curl_off_t connect;
         curl_easy_setopt(curl, CURLOPT_URL, url);
         res = curl_easy_perform(curl);
         if(CURLE_OK == res) {
           res = curl_easy_getinfo(curl, CURLINFO_APPCONNECT_TIME_T, &connect);
           if(CURLE_OK == res) {
             printf("Time: %" CURL_FORMAT_CURL_OFF_T ".%06ld", connect / 1000000,
                    (long)(connect % 1000000));
           }
         }
         /* always cleanup */
         curl_easy_cleanup(curl);
       }

⭐ AVAILABILITY ⭐

Added in 7.61.0 πŸ—“οΈ


πŸ’œ RETURN VALUE πŸ’œ

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not πŸ™ˆ


πŸ”₯ SEE ALSO πŸ”₯


and that's the whole vibe, bestie πŸ’… this iconic page comes from libcurl 7.61.0, dated 28 Apr 2018, with the footer label GNURLINFO...ECT_TIME_T(3) β€” slay πŸŽ€βœ¨

πŸ“¦ where this page comes from