mirror of
https://github.com/curl/curl.git
synced 2026-04-19 12:21:16 +03:00
Added comments about checking return code and the maxfd counter
This commit is contained in:
parent
efe3cb6e1a
commit
f53347631e
7 changed files with 27 additions and 0 deletions
|
|
@ -153,6 +153,10 @@ int main(int argc, char **argv)
|
|||
/* get file descriptors from the transfers */
|
||||
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
|
||||
/* In a real-world program you OF COURSE check the return code of the
|
||||
function calls, *and* you make sure that maxfd is bigger than -1
|
||||
so that the call to select() below makes sense! */
|
||||
|
||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
|
||||
switch(rc) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue