cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: How do I correlate request and response - Attached code

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 28 Feb 2008 22:30:00 +0100 (CET)

On Thu, 28 Feb 2008, Vijay wrote:

Please respect the posting rules for this list. No full-quotes (like your
previous post) and no top-posts, like this post. See
http://curl.haxx.se/mail/etiquette.html for all the details.

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

[...]

> 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.

You can use CURLOPT_HEADERDATA in the same way CURLOPT_WRITEDATA is used in
for example this snippet:

http://curl.haxx.se/lxr/source/docs/examples/getinmemory.c

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2008-02-28