MCPcopy Create free account
hub / github.com/audacity/audacity / getHandle

Method getHandle

libraries/lib-network-manager/curl/CurlHandleManager.cpp:298–320  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296}
297
298CurlHandleManager::Handle CurlHandleManager::getHandle (RequestVerb verb, const std::string& url)
299{
300 Handle handle (this, getCurlHandleFromCache (verb, url), verb, url);
301
302 if (!mProxy.empty ())
303 {
304 handle.setOption (CURLOPT_PROXY, mProxy);
305 // If we use proxy, checking the CRL will likely break the SSL proxying
306 handle.setOption (CURLOPT_SSL_OPTIONS, CURLSSLOPT_NO_REVOKE);
307 }
308
309 handle.setOption (CURLOPT_TCP_KEEPALIVE, 1L);
310
311 handle.setOption (CURLOPT_TCP_KEEPIDLE,
312 std::chrono::duration_cast<std::chrono::seconds> (KEEP_ALIVE_IDLE).count ()
313 );
314
315 handle.setOption (CURLOPT_TCP_KEEPINTVL,
316 std::chrono::duration_cast<std::chrono::seconds> (KEEP_ALIVE_PROBE).count ()
317 );
318
319 return handle;
320}
321
322std::string CurlHandleManager::getUserAgent () const
323{

Callers 1

performMethod · 0.80

Calls 2

emptyMethod · 0.45
setOptionMethod · 0.45

Tested by

no test coverage detected