Код: Выделить всё
conn->get_websocket_stream().set_option(boost::beast::websocket::stream_base::decorator(
[this, self, conn](boost::beast::websocket::response_type& response)
{
// modify response
if (some_condition)
{
conn->close(); // is it OK?
}
});
conn->get_websocket_stream().async_accept(request, ...);
https://www.boost.org/doc/libs/1_81_0/l ... rator.html
UPDATE
Код: Выделить всё
connКод: Выделить всё
get_websocket_stream()Код: Выделить всё
conn->close()Подробнее здесь: https://stackoverflow.com/questions/797 ... ator-callb
Мобильная версия