diff options
author | Dirk Manske <dm@nonitor.de> | 2010-09-30 11:33:33 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2010-09-30 22:20:52 +0200 |
commit | 5fb4279ec7199e291d9bf4c903f89395f60a3d31 (patch) | |
tree | 612b471c4674c8655fb6526ba6526383062117af /docs/examples/multi-app.c | |
parent | 67c83eb9eb491d6ec527e096b557d9cc689c2c08 (diff) |
multi & hiper examples: updates and cleanups
all multi and hiper examples:
* don't loop curl_multi_perform calls, that was <7.20.0 style, currently
the exported multi functions will not return CURLM_CALL_MULTI_PERFORM
all hiper examples:
* renamed check_run_count to check_multi_info
* don't compare current running handle count with previous value, this
was the wrong way to check for finished requests, simply call
curl_multi_info_read
* it's also safe to call curl_multi_remove_handle inside the
curl_multi_info_read loop.
ghiper.c:
* replaced curl_multi_socket (that function is marked as obsolete) calls
with curl_multi_socket_action calls (as in hiperfifo.c and
evhiperfifo.c)
ghiper.c and evhiperfifo.c:
* be smart as hiperfifo.c, don't do uncessary curl_multi_* calls in
new_conn and main
Diffstat (limited to 'docs/examples/multi-app.c')
-rw-r--r-- | docs/examples/multi-app.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/docs/examples/multi-app.c b/docs/examples/multi-app.c index bcc9f393a..a5e85c42f 100644 --- a/docs/examples/multi-app.c +++ b/docs/examples/multi-app.c @@ -56,8 +56,7 @@ int main(int argc, char **argv) curl_multi_add_handle(multi_handle, handles[i]); /* we start some action by calling perform right away */ - while(CURLM_CALL_MULTI_PERFORM == - curl_multi_perform(multi_handle, &still_running)); + curl_multi_perform(multi_handle, &still_running); while(still_running) { struct timeval timeout; @@ -108,8 +107,7 @@ int main(int argc, char **argv) default: /* one or more of curl's file descriptors say there's data to read or write */ - while(CURLM_CALL_MULTI_PERFORM == - curl_multi_perform(multi_handle, &still_running)); + curl_multi_perform(multi_handle, &still_running); break; } } |