Update tag value for tizen 2.0 build
[external/curl.git] / docs / libcurl / curl_multi_fdset.html
1 <html><head>
2 <title>curl_multi_fdset man page</title>
3 <meta name="generator" content="roffit 0.7">
4 <STYLE type="text/css">
5 P.level0 {
6  padding-left: 2em;
7 }
8
9 P.level1 {
10  padding-left: 4em;
11 }
12
13 P.level2 {
14  padding-left: 6em;
15 }
16
17 span.emphasis {
18  font-style: italic;
19 }
20
21 span.bold {
22  font-weight: bold;
23 }
24
25 span.manpage {
26  font-weight: bold;
27 }
28
29 h2.nroffsh {
30  background-color: #e0e0e0;
31 }
32
33 span.nroffip {
34  font-weight: bold;
35  font-size: 120%;
36  font-family: monospace;
37 }
38
39 p.roffit {
40  text-align: center;
41  font-size: 80%;
42 }
43 </STYLE>
44 </head><body>
45
46 <p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
47 <p class="level0">curl_multi_fdset - extracts file descriptor information from a multi handle <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
48 <p class="level0"><pre>
49 <p class="level0">#include &lt;curl/curl.h&gt;
50  <p class="level0">CURLMcode curl_multi_fdset(CURLM *multi_handle,
51  &nbsp;                          fd_set *read_fd_set,
52  &nbsp;                          fd_set *write_fd_set,
53  &nbsp;                          fd_set *exc_fd_set,
54  &nbsp;                          int *max_fd);
55  <p class="level0"></pre>
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 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 <p class="level0">To be sure to have up-to-date results, you should call <span Class="emphasis">curl_multi_perform</span> until it does not return CURLM_CALL_MULTI_PERFORM prior to calling <span Class="emphasis">curl_multi_fdset</span>.  This will make sure that libcurl has updated the handles' socket states. 
59 <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. 
60 <p class="level0">When doing select(), you should use <span Class="bold">curl_multi_timeout</span> to figure out how long to wait for action. Call <span Class="emphasis">curl_multi_perform</span> even if no activity has been seen on the fd_sets after the timeout expires as otherwise internal retries and timeouts may not work as you'd think and want. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
61 <p class="level0">CURLMcode type, general libcurl multi interface error code. See <span Class="emphasis">libcurl-errors(3)</span> <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
62 <p class="level0"><a class="manpage" href="./curl_multi_cleanup.html">curl_multi_cleanup (3)</a> <a class="manpage" href="./curl_multi_init.html">  curl_multi_init (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_multi_timeout.html">curl_multi_timeout (3)</a> <a class="manpage" href="./curl_multi_perform.html">  curl_multi_perform (3) </a> <p class="roffit">
63  This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
64 </body></html>