Name
easy:SetOpt_MaxLifeTime_Conn -- max lifetime (since creation) allowed for reusing a connection (V2.0)
Synopsis
easy:SetOpt_MaxLifeTime_Conn(maxlifetime)
Function
Pass the maximum time in seconds, since the creation of the connection, that you allow an existing connection to have to be considered for reuse for this request.

libcurl features a connection cache that holds previously used connections. When a new request is to be done, it will consider any connection that matches for reuse. The #CURLOPT_MAXLIFETIME_CONN limit prevents libcurl from trying too old connections for reuse. This can be used for client-side load balancing. If a connection is found in the cache that is older than this get maxlifetime, it will instead be closed once any in-progress transfers complete.

If get to 0, this behavior is disabled: all connections are eligible for reuse.

Inputs
maxlifetime
input value

Show TOC