cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Is Curl Connection persistant?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 15 May 2002 14:21:04 +0200 (MET DST)

On Wed, 15 May 2002, latha_srinivasan wrote:

> I am using the curl lib in my application. The calls that I use are
> curl_easy_init();
> curl_easy_setopt() and
> curl_easy_perform()
>
> With curl_easy_init() and curl_easy_setopt() during initialization and
> curl_easy_perform() when I have to make the actual connection.
>
> Is the connection persistant or is a connection made everytime I call
> curl_easy_perform()?

The first curl_easy_perform() obviously always create a new connection. The
subsequence calls, however, will attempt to re-use a previous one if there is
any.

> Basically does it make sense to create a connection pool to service
> multiple thrreads or not?

I makes sense to do as many transfers as possible without doing cleanup/init
between. It also boosts performance a lot.

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: bandwidth_at_sourceforge.net
Received on 2002-05-15