From f53347631eb4a5a075589e6fece43aced010a5bb Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 13 Oct 2006 14:01:19 +0000 Subject: Added comments about checking return code and the maxfd counter --- docs/examples/multi-app.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs/examples/multi-app.c') diff --git a/docs/examples/multi-app.c b/docs/examples/multi-app.c index 5383a40ae..6c0ef7e7f 100644 --- a/docs/examples/multi-app.c +++ b/docs/examples/multi-app.c @@ -80,6 +80,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) { -- cgit v1.2.3