curl-library
Re: Libcurl Connection Lifetime
Date: Sun, 16 Oct 2016 17:25:32 +0200 (CEST)
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:
https://curl.haxx.se/docs/todo.html#Offer_API_to_flush_the_connectio
as well as "Monitor connections in the connection pool":
https://curl.haxx.se/docs/todo.html#Monitor_connections_in_the_conne
and "Timeout idle connections from the pool":
https://curl.haxx.se/docs/todo.html#Timeout_idle_connections_from_th
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
Received on 2016-10-16