<pclass="level0">This function extracts file descriptor information from a given multi_handle. libcurl returns its fd_set sets. The application can use these to select() on, but be sure to FD_ZERO them before calling this function as <aclass="emphasis"href="./curl_multi_fdset.html">curl_multi_fdset(3)</a> only adds its own descriptors it doesn't zero or otherwise remove any other. The <aclass="emphasis"href="./curl_multi_perform.html">curl_multi_perform(3)</a> function should be called as soon as one of them are ready to be read from or written to.
<pclass="level0">If no file descriptors are set by libcurl, <spanClass="emphasis">max_fd</span> will contain -1 when this function returns. Otherwise it will contain the higher descriptor number libcurl set.
<pclass="level0">You should also be aware that when doing select(), you should consider using a rather small (single-digit number of seconds) timeout and call <spanClass="emphasis">curl_multi_perform</span> regularly - even if no activity has been seen on the fd_sets - as otherwise libcurl-internal retries and timeouts may not work as you'd think and want.
<pclass="level0">Starting with libcurl 7.16.0, you should use <spanClass="bold">curl_multi_timeout</span> to figure out how long to wait for action. <aname="RETURN"></a><h2class="nroffsh">RETURN VALUE</h2>
<pclass="level0">CURLMcode type, general libcurl multi interface error code. See <spanClass="emphasis">libcurl-errors(3)</span><aname="SEE"></a><h2class="nroffsh">SEE ALSO</h2>