curl-library
Reuse connection in half-closed state
Date: Fri, 31 Mar 2017 11:12:28 -0500
Hello,
I am using a GET request from C to establish a downchannel stream (for
Amazon Alexa), and I need to establish a stream to a different path at the
same base url on the existing connection. When I run my function to be
used for sending the GET request, VERBOSE returns 200, and the terminal is
idle, not proceeding further. If I wait long enough, I assume it times
out, as it says unexpected EOF, closing connection 0 and returns error code
56 (failure to receive data).
I was expecting the program to return from that function and call the next,
which is supposed to send a POST request, but it never seems to make it
that far. Can I use the same CURL easy handle for both the GET and POST
requests? Should I maybe be using separate threads for doing these things,
use the multi api rather than easy, or a combination? The connection
established by the GET request seems to be there for the purpose of waiting
for directives from Amazon (half-closed client side, open server side,
documentation mentions there can be long pauses between directives). My
question is how to reuse this same initial connection for a different
stream, whether this means using a multi handle or using more than one easy
handle. Thank you.
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-03-31