cURL / Mailing Lists / curl-library / Single Mail


Re: How to cleanly close the curl socket in case of multi interface?

From: Daniel Stenberg <>
Date: Fri, 19 Sep 2014 13:34:14 +0200 (CEST)

On Fri, 19 Sep 2014, nikhil ap wrote:

> I do like to keep the connection persistent in some cases and close in some
> other.

libcurl assumes persistent connections and will make its best to keep
connections alive and then possibly re-use them. You can use
CURLOPT_FORBID_REUSE to explicitly mark transfers to forbid subsequent
requests to re-use the connection that transfer uses.

Related, but probably not what you want here, you can use
CURLOPT_FRESH_CONNECT on an easy handle to force it to not re-use an existing

List admin:
Received on 2014-09-19