Boost logo

Boost :

Subject: Re: [boost] [beast] Chunking example
From: Vinnie Falco (vinnie.falco_at_[hidden])
Date: 2017-07-02 17:16:31


On Sun, Jul 2, 2017 at 9:49 AM, Bjorn Reese via Boost
<boost_at_[hidden]> wrote:
> But their APIs are quite different.

I'm not sure I agree that the claimed abstract similarity of the
concept warrants efforts to make the interfaces "consistent." The APIs
were not planned ahead of time, they were arrived at after months of
reworking to handle all of the use cases. Some use-cases were made
very easy, at the expense of some other less common use-cases
requiring more effort (such as extracting chunk extensions).

> Does Beast re-packet WebSocket frames...

Yes

>or HTTP chunks?

Chunk-encoding is removed from incoming messages before presentation
to the application layer. For outgoing messages, Beast is under
control over how pieces are chunked. However, the Body::reader type
has influence but not complete control (the specifications is
intentionally vague).

Users can set chunk extensions and trailers by using a ChunkDecorator
http://vinniefalco.github.io/beast/beast/using_http/serializer_stream_operations.html#beast.using_http.serializer_stream_operations.chunk_decorators

Thanks


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk