~ubuntu-branches/ubuntu/natty/curl/natty-proposed

« back to all changes in this revision

Viewing changes to docs/libcurl/curl_multi_fdset.html

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Schuldei
  • Date: 2009-05-24 21:12:19 UTC
  • mfrom: (1.1.12 upstream)
  • mto: (3.3.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 39.
  • Revision ID: james.westby@ubuntu.com-20090524211219-7jgcwuhl04ixuqsm
Tags: upstream-7.19.5
ImportĀ upstreamĀ versionĀ 7.19.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
                            int *max_fd);
55
55
 <p class="level0"></pre>
56
56
<a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
57
 
<p class="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 <a class="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 <a class="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. 
 
57
<p class="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 <a class="emphasis" href="./curl_multi_fdset.html">curl_multi_fdset(3)</a> only adds its own descriptors, it doesn't zero or otherwise remove any others. The <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> function should be called as soon as one of them is ready to be read from or written to. 
58
58
<p class="level0">If no file descriptors are set by libcurl, <span Class="emphasis">max_fd</span> will contain -1 when this function returns. Otherwise it will contain the higher descriptor number libcurl set. 
59
59
<p class="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 <span Class="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. 
60
60
<p class="level0">Starting with libcurl 7.16.0, you should use <span Class="bold">curl_multi_timeout</span> to figure out how long to wait for action. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>