cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Socket interface/curl_multi_socket_all()

From: Manuel Jung <gzahl_at_arcor.de>
Date: Fri, 18 May 2007 10:00:44 +0200

> > 6. Use curl_multi_timeout() to figure out how long to wait for action
>
> Nah, for the socket API we now recommend the CURLMOPT_TIMOUTFUNCTION
> callback that gets called when the timeout time changes. Otherwise your
> code will turn out ugly since you (as in the app) can't really know when
> the timeout changes as it might change on just about any call to libcurl.
Ok, that is just, what is written on the website.
>
> > I can add new easy_handles at between step 6 and 9? Is that right?
>
> Yes.
Fine :-)
>
> > If all downloads were done, but later ill have todo some again, can i
> > still stay in the 6 to 9 loop or do i have to call
> > curl_multi_socket_all() first, and go then back in the loop?
>
> Well, ignoring the fact that we've fixed a bug with this in 7.16.2 and
> earlier, you would not need to "go back" to *_socket_all().
> curl_multi_socket_all() remains a clever thing to call if you add multiple
> handles at once and want them taken care of as soon as possible.
Ok, this make sense for me, im adding always a couple of downloads.
> > There is no example with the curl_multi_socket_action() in the 7.16.2
> > release, is there?
>
> No, since curl_multi_socket_action() was added after that release!!
Ok, than ill use curl_multi_socket(), because i use the 7.16.2 release.

But it makes sense for me ot change the interface now to the socket interface?
I can change to curl_multi_socket_action() on the next release without
changing much?

Seems i have to look at the release Docs rather than the ones on the Website..
Kind Regards
Manuel Jung
Received on 2007-05-18