compat.boost-beast
#includeBoost.Beast 1.92.0 — HTTP and WebSocket networking on Boost.Asio (header-only)
#include <boost/beast.hpp>
mcpp add compat.boost-beast@1.92.0
Usage
From this repository's own test project — built and run by CI, not written for the website.
// Behavioral test for compat.boost-beast, entirely offline: buffer types,
// HTTP request parsing, response serialize + parse round-trip, the error
// path on malformed input, the bundled zlib streams, and beast::static_string.
// Including the boost/beast.hpp aggregate forces one TU through core + http +
// websocket + zlib, which is what validates the whole modular-boost closure
// wiring (asio, system, mp11, intrusive, ...) against the 1.92.0 train.
#include <boost/beast.hpp>
#include <string>
int main() {
namespace beast = boost::beast;
namespace asio = boost::asio;
namespace http = beast::http;
namespace zlib = beast::zlib;
bool ok = true;
// beast's parser.put() returns the number of octets it parsed and the
// caller must consume exactly that many from the dynamic buffer before
// feeding the rest — the same contract http::read() implements on top.
auto parse_all = [](auto& parser, beast::flat_buffer& buf) {
beast::error_code ec;
// …
tests/examples/boost-beast/tests/beast.cpp · project tests/examples/boost-beast
Build
- targets
boost_beast (lib)- language
c++20- import std
- no
- include dirs
*/include
Features
| feature | declares |
|---|---|
| default | implies |
| asio-config | defines |
Sources (1)
mcpp_generated/boost_beast_anchor.cpp
Generated files
mcpp_generated/boost_beast_anchor.cpp
Versions
| Version | Platforms | Mirrors | sha256 |
|---|---|---|---|
1.92.0 latest |
LinuxWindowsmacOS | source | de6f13081254… |