1

I am stuck with creating downchannel stream which is designed to remain open in a half-closed state from the client and open from AVS for prolonged periods of time.

It receives JSON response from ALEXA API without making a request since it is open all the time in a half-closed state.

Currently I am making a GET request using libcurl that shuts down as a 1 way process

Sample Request
:method = GET
:scheme = https
:path = /{{API version}}/directives
authorization = Bearer {{YOUR_ACCESS_TOKEN}}

I want to know how to keep connection on in a half-closed state using libcurl so that it gives response without making requests.

I am not expecting any code just a way to do so will do.

RDoonds
  • 485
  • 2
  • 6
  • 19
  • 1
    That sort of stuff is normally done with a GET request that just never is completed so that the client will sit waiting for more for a (potentially) long time. Thus libcurl will just consider it a normal but slow download. Isn't that what's happening? – Daniel Stenberg Aug 16 '16 at 06:50
  • @DanielStenberg Yes I am looking for such type of get request that remains open in a half closed state (HTTP2) and accepts JSON response without making a request. Can you explain in detail like how to implement a GET request that just never completed or link to any example from https://curl.haxx.se/libcurl/c/example.html? – RDoonds Aug 16 '16 at 17:20
  • That's nothing special from libcurl's point of view. Just GET the URL and it'll try to download it forever (unless you specify a timeout) until the server ends the end of it. Even the [simple](https://curl.haxx.se/libcurl/c/simple.html) example can do that! – Daniel Stenberg Aug 16 '16 at 21:37

0 Answers0