Вот существующий обратный вызов on_read --
Код: Выделить всё
/// Callback registered by async_read. It calls user registered callback to actually process the data. And then issue another async_read to wait for data from server again.
/// \param ec instance of error code
/// \param bytes_transferred
void
on_read(
beast::error_code ec,
std::size_t bytes_transferred) {
if(EnableVerbose)
{
boost::lock_guard guard(mtx_);
std::wcout
Подробнее здесь: [url]https://stackoverflow.com/questions/75979289/how-to-avoid-concurrent-callbacks-to-user-defined-routine[/url]
Мобильная версия