3#include <boost/asio/ip/tcp.hpp>
4#include <boost/beast/core.hpp>
5#include <boost/beast/websocket.hpp>
16 using web_socket_t = boost::beast::websocket::stream<boost::asio::ip::tcp::socket>;
22 std::unique_ptr<web_socket_t>
ws_;
32 void send(std::string_view msg);
web_socket_t & ws() const
WebSocketServer & server() const
WebSocketServer & server_
Connection(Connection &&)=default
Connection(const Connection &)=delete
std::unique_ptr< web_socket_t > ws_
void send(std::string_view msg)
void on_message(std::string str)
boost::beast::websocket::stream< boost::asio::ip::tcp::socket > web_socket_t
boost::asio::io_context io_ctx_
boost::asio::ip::tcp::acceptor acceptor_
std::function< void(std::string)> on_message_t
WebSocketServer(const WebSocketServer &)=delete