Re: new function
Date: Fri, 24 Aug 2001 11:07:11 +0200 (MET DST)
On Fri, 24 Aug 2001, T. Bharath wrote:
> Do you think it is possible to introduce a newfunction lets say CURL*
> curl_easy_duphandle(CURL* handle) which basically creates another handle
> with the same options as the handle being passed.
It would certainly be possible.
> The functionality would be similar to calling curl_easy_init and then
> again calling curl_easy_setopt but this would be much faster rather than
> again going through all the steps. The performance would be better than
> having a client side function which does the same thing(avoids the
> overhead of some many functions)
The question would be when you'd use it. I can only think of it as useful if
you have a multithreaded application and you run curl_easy_duphandle() for
each new thread to avoid a series of identical curl_easy_setopt() invokes in
> Internally maybe you could have control over the data structures that
> should not be duplicated.
Oh yes, we should probably re-arrange the internal structure then so that we
can more easily keep track of what data that should be duplicated and how.
Duplicating a handle could only be a matter of cloning data and options,
internal state info and things like persistant connections cannot be
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/Received on 2001-08-24