cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_multi_perform question

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Thu, 9 Sep 2004 15:09:24 +0200 (CEST)

On Thu, 9 Sep 2004, sKaBoy [utf-8] (LucaOgnibene) wrote:

> Hi! I'm using libcurl 7.11.2 from debian unstable. I'm developing an application
> using curl-multi interface.

libcurl 7.12.1 is in Debian unstable if you just apt-get! ;-)

> my callback is called 0 or 1 time when i call curl_multi_perform or it can
> be called a lot of time?

Yes. 0, 1 or more calls.

> I've tried with a url like file:/// and curl_multi_perform returns only at
> EOF and calls a lot of time my callback.

file:// URLs are not treated very nicely internally in the multi interface,
and this is mainly for portability reasons: windows (and a few other OSes)
can't be made to select() on plain file handles, only sockets.

> With a url like http:// curl_multi_perform calls my callback one time, then
> returns. mmm why?

Because of the implementation.

> I've not seen anything in the docs..

This isn't documented, and I don't see the need for it either. Except perhaps
for the docs/INTERNALS docs (which isn't very detailed anyway).

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