cURL / Mailing Lists / curl-library / Single Mail

curl-library

How do I correlate request and response - Attached code

From: Vijay <nags.vijay_at_gmail.com>
Date: Thu, 28 Feb 2008 14:07:49 +0530

Am having a callback function
header_callback(char *ptr, size_t msize, size_t nmemb, void *stream);

and am setting option as
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, header_callback

then in 1 thread am doing
curl_easy_perform(curl)

in one more thread also am doing curl_easy_perform(curl) for the same URL
eg: http://www.gmail.com is the one i tried

but callback function is same, so am getting callback,
but how can i correlated that the http response I got is for which request.

Am getting callback for both the request, but am not able to figure out for
which is the
http response for which request.

Is there anyway to find whenever you send an Http Request,
the Http response we got is for which request sent from us.
Using only one CURL *curl;

Attached my code sample :)

On Wed, Feb 27, 2008 at 5:44 PM, Vijay <nags.vijay_at_gmail.com> wrote:

> Hi,
> Am posting two http request(same URL text), from different threads.
> Am getting http response but how do I correlate which response is for
> which request.
> Please do let me know.
>
> regards,
> Nagarajan
>
>

-- 
VIJAY
Received on 2008-02-28