curl / Mailing Lists / curl-library / Single Mail

curl-library

libcurl multi interface. Doubts about reusing connection and closing them

From: Santiago Carot via curl-library <curl-library_at_cool.haxx.se>
Date: Mon, 30 Oct 2017 12:22:57 +0100

Hi there!.
I've got some doubts about how curl manages persisten connections and if
there is some chance to close the underlaying TCP connection.

Lets say, for example, I'm using the multi interface. Whenever I need to
make a request I add a new easy handler, all handlers I'm adding to the
multi handler have the same URL. Will curL re-use an active TCP connection
when possible?. If so, when the underlaying TCP socket will be close?.

On the other hand, lets suppose that one of those requests results in a
HTTP 500 error code response, will curl close the underlaying TCP socket?,
if it does not, is there a way to explicitly tell curl to close the socket
not to be re-used anymore depending of the response code received from the
server?

Regards.

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-10-30