Start the asynchronous operation
| 71 | |
| 72 | // Start the asynchronous operation |
| 73 | void |
| 74 | on_run() |
| 75 | { |
| 76 | // Set suggested timeout settings for the websocket |
| 77 | ws_.set_option( |
| 78 | websocket::stream_base::timeout::suggested( |
| 79 | beast::role_type::server)); |
| 80 | |
| 81 | // Set a decorator to change the Server of the handshake |
| 82 | ws_.set_option(websocket::stream_base::decorator( |
| 83 | [](websocket::response_type& res) |
| 84 | { |
| 85 | res.set(http::field::server, |
| 86 | std::string(BOOST_BEAST_VERSION_STRING) + |
| 87 | " websocket-server-async"); |
| 88 | })); |
| 89 | // Accept the websocket handshake |
| 90 | ws_.async_accept( |
| 91 | beast::bind_front_handler( |
| 92 | &session::on_accept, |
| 93 | shared_from_this())); |
| 94 | } |
| 95 | |
| 96 | void |
| 97 | on_accept(beast::error_code ec) |
nothing calls this directly
no test coverage detected