News

News

RSS feed
05/08/2023
The Future of Boost

Greetings! I’m Vinnie Falco, Boost library author, C++ enthusiast, and the founder of The C++ Alliance, a 501(c)(3) non-profit. While some of you are enjoying the C++Now conference this week, I’d like to share some background on our organization and some history, outline a vision and goals for C++ and Boost, and solicit your feedback and support. How It Started I took notice of the C++ Standards Committee (“WG21”) while I was writing Boost.Beast in 2016. Howard Hinnant, a co-workers at Ripp...

Continue Reading
01/02/2023
Asio 201 - timeouts, cancellation & custom tokens

Since asio added and beast implemented per-operation cancellation, the way timeouts can be implemented in asio code has changed significantly. In this article, we’ll go from simple timeouts to building our own timeout completion token helper. Cancellation A timeout is a defined interval after which a cancellation will be triggered, if an action didn’t complete by then. Timeouts can be a way of handling runtime errors, but one should generally be prudent about their usage. Indiscriminate a...

Continue Reading
12/11/2022
Asio 201 - deferred

Asio deferred Aysnc operations Asio introduced the concept of an async_operation, which describes a primary expression that can be invoked with a completion token. In C++20 this is also a language concept. asio::io_context ctx; asio::async_operation auto post_op = [&](auto && token){return asio::post(ctx, std::move(token));}; auto f = post_op(asio::use_future); ctx.run(); f.get(); // void Async operations can be used in parallel_group and directly co_awaited in C++20. asio:...

Continue Reading
11/16/2022
New in Boost 1.81

New Library: Url Boost.url has been released. And it’s awesome. Json & Describe Boost.json is now integrated with Boost.describe. That means that any class, struct, or enum that has describe annotations can be directly serialized to and from json. You can fine examples here. Additionally, variant2 is also supported. Unordered Unordered got a new map type, unordered_flat_map, and the corresponding set type unordered_flat_set. These two containers lay out the map in a flat array, i...

Continue Reading
08/10/2022
Richard's August Update

Beast and HTTP Redirect Some months ago, I was asked how to handle HTTP redirect responses in beast. Characteristically, I took a moment to model how I would do that in my head, waved my hands and kind of explained it and that was that. Then more recently, someone else asked how beast websockets would handle a redirect response when performing a websocket handshake. Now I’m pretty sure that websocket clients have no requirement at all to follow redirects. I believe the WebSocket specific...

Continue Reading