cURL / Mailing Lists / curl-library / Single Mail

curl-library

Pipelining request response sequence.

From: Pankaj Takawale <pankaj.takawale_at_gmail.com>
Date: Mon, 14 Nov 2011 15:46:46 -0500

libcurl version 7.21.4I tried multi interface with PIPELINING.
I noticed that libcurl uses same connection for pipelining http GET
requests; but it does not send requests together; instead it sends
second request after receving response from first request.I was
expecting req1,req2,resp1,resp2I noticed: req1,resp1,req2,resp2
Sample code:  http_handle = curl_easy_init();  http_handle2 =
curl_easy_init();  curl_easy_setopt(http_handle, CURLOPT_URL,
"http://curl.haxx.se");  curl_easy_setopt(http_handle2, CURLOPT_URL,
"http://curl.haxx.se");  multi_handle = curl_multi_init();
  curl_multi_setopt(multi_handle, CURLMOPT_PIPELINING, 1L);
  curl_multi_add_handle(multi_handle, http_handle);
  curl_multi_add_handle(multi_handle, http_handle2);
curl_multi_perform(multi_handle, &still_running);
   ...
Attached detailed strace log.
Please advice how to achieve req1,req2,resp1,resp2 on same connection.
Regards,
Pankaj.--
Pankaj Takawale

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2011-11-14