cURL / Mailing Lists / curl-users / Single Mail

curl-users

libCurl - clearing connection cache?

From: Jason Bright <jaybright_at_gmail.com>
Date: Thu, 27 Sep 2012 14:22:47 +1000

Hello - slightly new to curl (inherited an application using it) .
Couldn't find an answer to this in the docs:

-using libCurl 7.27.
-Current code is using the curl_easy_* interfaces.

Question:

Is there an API to expire/flush the cached connections pool?

For complicated reasons (I'll spare you), at times I *know* the
current connections are now invalid. I'd like to close the current
cache population.
Otherwise, I try a new curl operation and the app has to wait for
connection to fail and timeout.... can take minutes (annoying when i
already know that will happen).

I see my options are:

1) Flush connections at the appropriate time -- is there an API?
1)use FORBID_REUSE - works, but is a big performance hit.
2)re-prime the cache using some dummy FRESH_CONNECT jobs. Ugly but workable....

Feedback welcome ;)

cheers - j
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-09-27