cURL / Mailing Lists / curl-library / Single Mail


Re: a question about using libcurl two threads

From: Daniel Stenberg <>
Date: Thu, 9 Sep 2004 15:04:57 +0200 (CEST)

On Thu, 9 Sep 2004, [gb2312] 黄志军 wrote:

> As known, if use curl_multi_fdset(), it must do curl_multi_add_handle() to
> prepare the multi_handle handle.

Yes, otherwise libcurl won't have any sockets to return in the
curl_multi_fdset() call.

> That means i must add all the simple handle before i can use
> curl_multi_add_handle().

No, you can add as many as you like. But you need to add at least one, as
otherwise there won't be any fdsets to return.

> But that is a big difference to my module's mechanism.

Then you have a few choices: adapt your code to libcurl, adapt libcurl to fit
your code or skip libcurl all together.

      Daniel Stenberg -- --
       Dedicated custom curl help for hire:
Received on 2004-09-09