Boost logo

Boost :

Subject: Re: [boost] Error to convert to boost::asio::streambuf to raw buffer char *buffer
From: Vinnie Falco (vinnie.falco_at_[hidden])
Date: 2018-12-18 00:57:40


On Mon, Dec 17, 2018 at 4:41 PM Steven Watanabe via Boost
<boost_at_[hidden]> wrote:
> asio::streambuf doesn't necessarily store contiguous data,
> so this can't work as is.

Actually it does, and you can simply write:

    boost::beast::buffers_front(streambuf.data());

To retrieve a const_buffer to the first (and only) buffer in the data.

Thanks


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