curl_easy_ssls_export: make the example more clear

As mentioned in #18031
Closes #18117
This commit is contained in:
Stefan Eissing 2025-07-31 15:13:49 +02:00 committed by Daniel Stenberg
parent ba9ddb9357
commit 077fd6aac8
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -150,6 +150,12 @@ int main(void)
if(curl) {
curl_easy_setopt(curl, CURLOPT_SHARE, share);
/* run a transfer, all TLS sessions received will be added
* to the share. */
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_perform(curl);
/* export the TLS sessions collected in the share */
rc = curl_easy_ssls_export(curl, my_export_cb, NULL);
/* always cleanup */