curl / Mailing Lists / curl-library / Single Mail


Re: Create Serverside Streaming connection using libcurl

From: Ray Satiro via curl-library <>
Date: Mon, 1 Apr 2019 02:40:41 -0400

On 3/30/2019 4:59 AM, Prashant Shubham via curl-library wrote:
> On 3/30/19, Daniel Stenberg <> wrote:
>> On Thu, 7 Mar 2019, Prashant Shubham via curl-library wrote:
>>> I have gone through libcurl but couldn't find a clear implementation of
>>> streaming connection except rtsp one.
>> I would say the opposite and claim that libcurl supports streaming of
>> virtually all protocols. At least the TCP based ones. libcurl will sit and
>> wait for data until data arrives and then it delivers it. Over and over
>> until
>> the end of connection (which might neve occur).
>> --
>> /
> Hi Daniel,
> It would be great help if you could point to some examples.

If you are parsing messages from a stream in real time you'll have to
store the received bytes so that you can accumulate enough bytes to
parse a message. There's no guarantee that your write callback will
receive all the bytes you expect in one call. For example

Received on 2019-04-01