cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: feature request and/or just help me

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Mon, 9 Aug 2004 12:42:05 +0200 (CEST)

On Mon, 9 Aug 2004, *~^-+=:[*_*]:=+-^~* wrote:

Please use a real name when you post. Using gibberish like this will only make
your mail much more likely to get caught in numerous spam filters. I was about
to delete it myself.

> i have an idea that will make curl_multi_* functions much better to use, for
> example if u want to get a lot of urls but dont want to wait for it to dl
> all of them but instead want to do something to it when one of the downloads
> finishes, for example add a CURLOPT_DONEFUNCTION that would point to a
> function that would run when one dl finishes

You don't need libcurl to run this function for you. You know when a transfer
completes and you can easily run this function on your own when that happens!

> also i am totally into php, so i would love to get this functionally in php

I believe PHP5 supports the multi interface.

> also there is a way to do this without adding this functionallity is by
> telling me what function that i can use in php/curl to tell if a particular
> curl_easy handle is actually finished

  When a transfer completes, the counter of running transfers in the second
argument to curl_multi_perform() will be decreased. When this happens,
curl_multi_info_read() can be used to obtain info about which easy handle that
completed.

> and i have a question, what happens to the curl_easy handle after its
> finished, i mean can i reuse it

You can reuse it. If you add it to the multi handle again (after having
removed it), the same transfer will be done again.

> can i add more handles to curl_multi in between curl_multi_exec calls

Yes you can.

> even if u guys dont know i have to say that "curl rocks!!!!!!!!"

Thanks!

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-08-09