curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: Serverside Streaming connection using libcurl

From: Prashant Shubham via curl-library <curl-library_at_cool.haxx.se>
Date: Thu, 20 Dec 2018 21:00:26 +0530

On 12/20/18, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Mon, 17 Dec 2018, Prashant Shubham wrote:
>
>>> If you want the client to get the data as soon as it gets available then
>>>
>>> you should probably just make a request with curl and not have a timeout.
>>>
>>> Then curl will just sit there waiting for the transfer to start or
>>> complete, until the server does that. And when one transfer is done, the
>>>
>>> client can just issue another request and go back to waiting...
>
>> But meanwhile when we client is issuing another request what if server has
>>
>> to send another new command to client, wouldn't the client miss that
>> command?
>
> If the server can't cache the data for a while then I would say uysing HTTP
>
> for this setup seems wrong.
>
> --
>
> / daniel.haxx.se
>

I can understand what you are suggesting is long-polling but what I
want to implement is Server sent
events(https://www.smashingmagazine.com/2018/02/sse-websockets-data-flow-http2/)
. I guess libcurl doesn't have support for that.
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-12-20