curl-library
RE: curl_multi_fdset always returns -1 for maxfd
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 12 Nov 2014 14:13:11 +0100 (CET)
Date: Wed, 12 Nov 2014 14:13:11 +0100 (CET)
On Wed, 12 Nov 2014, Vishakha Vaidya wrote:
> 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?
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().
Further desrcibed in the man page:
http://curl.haxx.se/libcurl/c/curl_multi_fdset.html
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2014-11-12