cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: stop-command / C++ wrapper

From: Thomas Ko <thomasko321m_at_gmx.at>
Date: Fri, 15 Sep 2000 15:56:22 +0200 (MEST)

> On Fri, 15 Sep 2000, Thomas Ko wrote:
>
> > I'm writing a wrapper class in C++ for curl. - I want to add a
> > STOP-Command to stop an ongoing transfer. The only way I see to handle
> > this is to install a callback-function and return an error. - that
> would
> > abort the transfer. - or how should I do that???
>
> That is currently the only available option, yes. Another one would of
> course
> be to kill the whole process.

that's not an option because I want to use the class in an threaded
environment. - and killing threads - i don't know if it works good enough.

> > Do you plan to include a stop-command or something more elegant?
>
> I have no plans in that direction, as I haven't heard from anyone with a
> need
> for it! :-)
>
> If you would design the perfect stop-command, how would it work?

I haven't looked at the code for curl_easy_perform() (i don't know the
exact name yet) but it should have a flag-test in the worker-loop that has to
be tested - when it is set, the loop will finish - not very different to the
callback-method but a little bit more user-friendly. IMHO

> > The class will be thread-safe and is based on 7.2.1 . All the features
> > that are in 7.2.1 are enabled.
>
> Cool!

Any suggestions for a the interface of the class?

Thomas Kotzian

-- 
Sent through GMX FreeMail - http://www.gmx.net
Received on 2000-09-15