cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: dose we need a curl_mulit_perform_nonblock?

From: Sun Yi Ming <yimings_at_cgogo.com>
Date: Mon, 6 Feb 2006 23:08:31 +0800

Daniel Stenberg wrote:
> Really? I don't understand the difference. What operations are not waiting for
> socket events?

When a easy handle is new added, it's state is CURLM_STATE_INIT, it dosn't
wait anything; when it goes to CURLM_STATE_DONE, it wait nothing and can go
CURLM_STATE_COMPLETED, am i wrong? Either we need perform one easy
handle until it do wait some events or goto end, or we should have a way to run these
handles periodically.

> When select() returns non-zero, you know that Y out of Z connections had
> socket action. How can libcurl tell which the Y connections are without going
> over all the Z ones?

In fact, i don't understand this, but i guess the curl_multi_socket do the proper thing.
If you mean how libcurl can report events, in the body curl_multi_perform_nonblock
there may have attempt to do io things so events are reported, the other handles' events
are kept not changed.

Sun Yi Ming
Received on 2006-02-06