GNURLINFO...ECT_TIME_T(3)
π 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
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 2018 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms