On Tue, 11 Oct 2016, Ranjan Khanna wrote:

Does libcurl has any API that sets the persistent connection  expiry time?

Nope, nothing like that unfortunately.

Basically, what I want is that libcurl should expire/close an already establishes connection after x minutes and then re-establishes the connection itself.

libcurl only establishes connections when you ask for a transfer and there's no already established one in the pool to reuse. It never establishes any ahead of time.

But we've discussed similar ideas before and "Offer API to flush the connection pool" is already in the TODO:


as well as "Monitor connections in the connection pool":


and "Timeout idle connections from the pool":


So we can clearly say that there are a lot of ideas on how to improve the connection caching and the API/controls for that. We mostly lack someone actually working on that..

 / daniel.haxx.se

List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html

Reply via email to