cURL / Mailing Lists / curl-library / Single Mail


multi API q

From: Daniel Stenberg <>
Date: Tue, 27 Nov 2001 13:56:16 +0100 (MET)

Imagine a working "multi" interface for libcurl. The multi-app.c example code
is working. Using that code, you can downlad HTTP and upload FTP
simultaneously while also taking care of your own file descriptors. In one
single thread.

Now, a question. Say you want to download several HTTP pages using the http
handle (while the FTP transfer is still going). How would you go about and do

When using the easy interface, you just call curl_easy_perform() again, but
with the multi interface, there's really no good equivalent way of doing
that. Using the currently described API (approach A), I figure you'd need

 1. Remove the single http handle from the multi stack with
 2. Set new options in the http handle with curl_easy_setopt(), in good old
 3. Attach the handle again to the multi stack with curl_multi_add_handle()

Alternatively, the handle could B) be removed automatically from the stack
when the transfer is done, or perhaps C) the new options could be set on the
handle without removing it from the multi stack, only requiring a call to
some function to let it know the options are updated and that it is ready for
another run...

I know this question is very theoritecal and hypothetical, but I still need
to decide...

    Daniel Stenberg -- curl groks URLs --
Received on 2001-11-27