curl-library
RE: curl_multi_fdset always returns -1 for maxfd
Date: Wed, 12 Nov 2014 12:46:32 +0000
> -----Original Message-----
> From: curl-library [mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Daniel Stenberg
> Sent: Wednesday, November 12, 2014 6:04 PM
> To: libcurl development
> Subject: RE: curl_multi_fdset always returns -1 for maxfd
>
> On Wed, 12 Nov 2014, Vishakha Vaidya wrote:
> > Like I said the problem is windows only, on my mac it works fine.
> Yes, but windows builds use the threaded resolver by default and I suspect your mac build may not, so I tried the threaded one on Linux in an effort to repeat the problem. And it wouldn't repeat.
>
> The libcurl code isn't that very different for Windows vs the other platforms so I don't see what makes this fails only on Windows.
>
> What if you just avoid the select() when maxfd is negative and instead just sleep for 100ms or something?
>
> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
If I avoid both curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd); and select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
Just use curl_multi_perform(multi_handle, &still_running);
the code works, is that the right way to do it?
Regards,
Vishakha
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-11-12