curl-library
RE: Re: new function
Date: Sat, 25 Aug 2001 12:05:47 -0400
Thanks a lot for the positive feedback
>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
>every thread.
>Or?
Yes thats right
When can i expect the function :-)
Regards
Bharth
Original Message:
-----------------
From: Daniel Stenberg daniel_at_haxx.se
Date: Fri, 24 Aug 2001 11:07:11 +0200 (MET DST)
To: TBharath_at_responsenetworks.com, curl-library_at_lists.sourceforge.net
Subject: Re: new function
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
every thread.
Or?
> 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
transfered.
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/ -------------------------------------------------------------------- Mail2Web - Check your email from the web at http://www.mail2web.com/ .Received on 2001-08-26