cURL / Mailing Lists / curl-users / Single Mail

curl-users

curl_multi_perform: Is there any way to know about the end of response after doing curl multi perform

From: venkat akella <akellav_at_gmail.com>
Date: Thu, 16 Nov 2006 10:27:56 -0800

Hi
    I am calling curl_multi_perform() C API to send/receive the http
request/response. curl_multi_perform() call returns CURLM_OK and
still_running is populated with 1.

Q1. For HTTP1.1 persistent connections, when
curl_multi_perform(multi_handle, &running_handles) call sets running_handles
to zero? I am
asking this because even after sending a request and receiving resopnse for
that request, running_handles is set to 1. So, is running_handles will be
set to zero only after all the connections(Even persistent connections) are
closed?

Q2. With a call to curl_multi_perform(multi_handle, &running_handles), I
sent a request to server and received the response. My question is how do I
know whether I received the complete response or not during the
curl_multi_perform() call in my program. I didnt see any call back function
or some other way which tells the response is received completely. Looks
like curl_multi_perform(multi_handle, &running_handles) call doesnt block.
What happens when the client received partial response from the server and
called curl_multi_perform() in the code?

Thanks for your response.
Venkat Akella.
Received on 2006-11-16