cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: curl_multi_fdset always returns -1 for maxfd

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 13 Nov 2014 09:39:46 +0100 (CET)

On Wed, 12 Nov 2014, Vishakha Vaidya wrote:

>> No. You want curl_multi_fdset() to figure out what to wait for, but if
>> there's nothing to wait for you can/should just wait a short while instead
>> of calling select().

> It doesn't work. Unless I keep calling multi_perform in a loop, the state
> does not change from CURLM_STATE_WAITRESOLVE to CURLM_STATE_WAIT_CONNECT.

I don't understand what you say here. The sleep I mentioned would be instead
of select() when maxfd is -1, you would of course still call
curl_multi_perform() until the transfer is complete.

Is this not clear in the documentation and examples?

> Are you unable to reproduce the problem, with the code I sent?

Exactly, but I don't develop on or run Windows so I haven't tried it in your
exact conditions.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2014-11-13