curl-library
curl_multi_socket_action and pipelining
Date: Thu, 18 Jun 2015 10:37:26 +0100
I may have found a bug, but could somebody tell me how you are
supposed to use the curl_multi_socket_action API when using
pipelining?
My problem is that the requests are pipelined, but not in the order in
which they were curl_multi_add_handle()ed. Instead the requests are
sent in an apparently random order.
When using curl_multi_perform() instead, which I think is what all the
curl tests use when testing pipelining, the requests are done
correctly, in order.
I have adapted the hiperfifo.c example to show the problem, you can
see it in http://pastebin.com/aY9GFDDd
I'm testing with libcurl 7.43. I'm even using CURLOPT_PIPEWAIT.
I have tried delaying the curl_multi_add_handle() calls until the
first one finishes, but it doesn't help. And doing all the
curl_multi_add_handle() calls before any transfer works fine with
curl_multi_perform().
It's a bug or I'm doing something wrong?
curl_multi_socket_action is the recommended multi interface, isn't it?
Thanks.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-06-18