cURL / Mailing Lists / curl-library / Single Mail


Re: curl_multi_perform usage & easy handle "reset"

From: Robert Iakobashvili <>
Date: Sun, 12 Aug 2007 15:43:56 +0300

On 8/11/07, Daniel Stenberg <> wrote:
> > There are two major user scenarios here:
> > a) restart transfer using a handle with the same URL, etc as for the
> > previous transfer;
> > b) re-use the handle for another URL (could be after http - ftp), or
> other
> > params;
> Yeps, but case A above is probably not very common...

It is common, when a testing/loading application is simulating a client side
(e.g. curl-loader, just a few to mention :-) ).

> We could add a curl_multi_restart_handle().
> The only objection could possibly be that today an app is basically
> expected
> to detatch the easy handle, set new options and re-add it. It means that
> the
> easy handle is not attached to the multi when it gets options set.

If we add curl_multi_restart_handle() it pretty much relies on the fact that
> after a particular easy handle has completed a transfer, you change
> options of
> it while it still is connected to the multi handle, and then you restart
> it.
> I'm not saying we can't do that, just that it makes the usage someone
> different.

Yes, this is a different usage mode to be described and documented in due

Also, we need to consider how to react if an app calls
> curl_multi_restart_handle() in the middle of a transfer.

Good point. The first hypostases of the function may return an error,
when a handle is in the middle of a transfer.

Canceling a transfer in the middle could be another sophistication and a
issue, like curl_multi_stop_handle() ...

Robert Iakobashvili,
coroberti %x40 gmail %x2e com
A web testing and traffic generation tool.
Received on 2007-08-12