C++20 introduced language support for coroutines. My understanding is that that this consists of syntactic sugar, such as co_await
and co_return
, to which semantic meaning is attached via special "hooks".
The language support allows for idiomatic expression of asynchronous logic; in effect, allowing for code that reads sequentially, even where it uses callback mechanisms under the hood.
Does Boost.Beast have any support for C++20 coroutines, and if so, how can the two be used together? In particular, is it possible to read and write messages asynchronously over an unencrypted or SSL-encrypted websocket?
Like Richard just said. Here's the
websocket_client_coro_ssl.cpp
example reworked: