Buy commercial curl support from WolfSSL. We help you work
out your issues, debug your libcurl applications, use the API, port to new
platforms, add new features and more. With a team lead by the curl founder
himself.
RE: How to printout CURL_VERSION_UNIX_SOCKETS
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Matthew Bobowski via curl-library <curl-library_at_lists.haxx.se>
Date: Sun, 2 Oct 2022 14:51:35 +0000
Jian,
I’m not sure what you’re trying to accomplish. CURL_VERSION_UNIX_SOCKETS is a bit flag for features – not a version.
Try this:
auto data = curl_version_info(CURLVERSION_NOW);
printf("Curl version: %s\n", data->version);
if (data->features & CURL_VERSION_UNIX_SOCKETS)
printf("Curl supports UNIX sockets.\n");
else
printf("Curl does NOT support UNIX sockets.\n");
-Matt
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
From: jian he via curl-library<mailto:curl-library_at_lists.haxx.se>
Sent: Sunday, October 2, 2022 5:39 AM
To: curl-library_at_lists.haxx.se<mailto:curl-library_at_lists.haxx.se>
Cc: jian he<mailto:jian.universality_at_gmail.com>
Subject: How to printout CURL_VERSION_UNIX_SOCKETS
Hello world.
In curl.h
#define CURL_VERSION_UNIX_SOCKETS (1<<19) /* Unix domain sockets support */
In https://curl.se/libcurl/c/curl_version_info.html
CURL_VERSION_UNIX_SOCKETS
libcurl was built with support for Unix domain sockets. (Added in 7.40.0)
So from here, we can print out CURL_VERSION_UNIX_SOCKETS to 7.40.0?
Here is what I tried:
printf("CURL_VERSION_UNIX_SOCKETS version: %u.%u.%u\n"
,(CURL_VERSION_UNIX_SOCKETS >> 19 ) & 0xff
,(CURL_VERSION_UNIX_SOCKETS >> 16) & 0xff
,(CURL_VERSION_UNIX_SOCKETS >> 8) & 0xff
);
it print out: CURL_VERSION_UNIX_SOCKETS version: 1.8.0
So it failed.
overall, I don't understand: #define CURL_VERSION_UNIX_SOCKETS (1<<19) /* Unix domain sockets support */
Date: Sun, 2 Oct 2022 14:51:35 +0000
Jian,
I’m not sure what you’re trying to accomplish. CURL_VERSION_UNIX_SOCKETS is a bit flag for features – not a version.
Try this:
auto data = curl_version_info(CURLVERSION_NOW);
printf("Curl version: %s\n", data->version);
if (data->features & CURL_VERSION_UNIX_SOCKETS)
printf("Curl supports UNIX sockets.\n");
else
printf("Curl does NOT support UNIX sockets.\n");
-Matt
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
From: jian he via curl-library<mailto:curl-library_at_lists.haxx.se>
Sent: Sunday, October 2, 2022 5:39 AM
To: curl-library_at_lists.haxx.se<mailto:curl-library_at_lists.haxx.se>
Cc: jian he<mailto:jian.universality_at_gmail.com>
Subject: How to printout CURL_VERSION_UNIX_SOCKETS
Hello world.
In curl.h
#define CURL_VERSION_UNIX_SOCKETS (1<<19) /* Unix domain sockets support */
In https://curl.se/libcurl/c/curl_version_info.html
CURL_VERSION_UNIX_SOCKETS
libcurl was built with support for Unix domain sockets. (Added in 7.40.0)
So from here, we can print out CURL_VERSION_UNIX_SOCKETS to 7.40.0?
Here is what I tried:
printf("CURL_VERSION_UNIX_SOCKETS version: %u.%u.%u\n"
,(CURL_VERSION_UNIX_SOCKETS >> 19 ) & 0xff
,(CURL_VERSION_UNIX_SOCKETS >> 16) & 0xff
,(CURL_VERSION_UNIX_SOCKETS >> 8) & 0xff
);
it print out: CURL_VERSION_UNIX_SOCKETS version: 1.8.0
So it failed.
overall, I don't understand: #define CURL_VERSION_UNIX_SOCKETS (1<<19) /* Unix domain sockets support */
-- I recommend David Deutsch's <<The Beginning of Infinity>> Jian
-- Unsubscribe: https://lists.haxx.se/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.htmlReceived on 2022-10-02