Hi all,
i'm using the easy interface of libcurl for a client https, whose connections
towards a web server should be persistent (using Http 1.1 this should be
ensured by the http keepalive mechanism).
To check the state of such connections i'm thinking to use the following code
snippet:
...
long socketDescriptor = -1;
CURLcode code = curl_easy_setopt(myCurl, CURLINFO_LASTSOCKET,
&socketDescriptor);
...
if ( socketDescriptor == -1 )
{
// Connection is no more up
}
else
{
// Connection is still up
}
...
Is it the right way, or is there another and better way?
And in a multithreaded environment could this check conflict with an https
operation performed on this connection?
Massimo-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html