the return values ofcurl_multi_exec and curl_multi_select
Date: Thu, 27 Jul 2006 16:34:00 -0500
I'm trying to better understand the cURL mutli interface and have a few
curl_multi_exec seems to return the status - it's value can be CURLM_OK,
CURLM_SOME_ERROR, or CURLM_CALL_MULTI_PERFORM. What does
CURLM_CALL_MULTI_PERFORM mean? Does it mean that curl_multi_exec is
currently sending a request or recieving a response?
Also, I assume the second parameter of curl_multi_exec represents how many
socket connections are still open? I tried to load three URLs - the last of
which had sleep(5) in it. If the second parameter represented the number of
open socket connections, shouldn't it reduce down to 1 really fast? I ask
because that's not what happened when I tested it. When I tested it, the
value remained 3 until close to the very end.
Finally, what does curl_multi_select's return value mean? In one of the
code examples I've seen (in fact, the only code example I've seen demo'ing
it at php.net), the second curl_multi_exec loop is only called if
curl_multi_select != -1. What other values can curl_multi_select return?
The comment says "wait for network", but what does this mean?
Anyway, any help would be apprecaited - thanks!
Received on 2006-07-27