curl-users
Re: libCurl - clearing connection cache?
Date: Sat, 29 Sep 2012 16:24:47 +0200 (CEST)
On Thu, 27 Sep 2012, Jason Bright wrote:
Hi!
Do note that the curl-library is a mailing list suitable for libcurl stuff, as
this list is for the command line tool!
> Is there an API to expire/flush the cached connections pool?
No there isn't. The connection pool is meant to only serve as a cache and it
is meant to close off and remove dead connections by itself.
> 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.
The only existing way I can think of to flush all connections is to close the
easy/multi handle completely and create a new one.
> 2)re-prime the cache using some dummy FRESH_CONNECT jobs. Ugly but
> workable....
It makes no point to "re-prime" it at all if you ask me. It'll just be a bunch
of connections in use that may not be used at all and that may even be killed
again before they will be used...
Now, please take any follow-ups to the curl-library list!
-- / daniel.haxx.se ------------------------------------------------------------------- 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.htmlReceived on 2012-09-29