In C++20 asio permits a receive buffer to be a local variable in a coroutine, see: talking-async.
To prepare for migrating to coroutines, a receive event should call a new receive_callback_type with a pointer to the receive buffer and the number of bytes received, instead of calling the current event_callback_type with a RECEIVED event id.
In C++20
asio
permits a receive buffer to be a local variable in a coroutine, see: talking-async.To prepare for migrating to coroutines, a receive event should call a new
receive_callback_type
with a pointer to the receive buffer and the number of bytes received, instead of calling the currentevent_callback_type
with aRECEIVED
event id.