| 232 | // Start the asynchronous accept operation |
| 233 | template<class Body, class Allocator> |
| 234 | void |
| 235 | do_accept(http::request<Body, http::basic_fields<Allocator>> req) |
| 236 | { |
| 237 | // Set suggested timeout settings for the websocket |
| 238 | ws_.set_option( |
| 239 | websocket::stream_base::timeout::suggested( |
| 240 | beast::role_type::server)); |
| 241 | |
| 242 | // Set a decorator to change the Server of the handshake |
| 243 | ws_.set_option(websocket::stream_base::decorator( |
| 244 | [](websocket::response_type& res) |
| 245 | { |
| 246 | res.set(http::field::server, |
| 247 | std::string(BOOST_BEAST_VERSION_STRING) + |
| 248 | " advanced-server"); |
| 249 | })); |
| 250 | |
| 251 | // Accept the websocket handshake |
| 252 | ws_.async_accept( |
| 253 | req, |
| 254 | beast::bind_front_handler( |
| 255 | &websocket_session::on_accept, |
| 256 | shared_from_this())); |
| 257 | } |
| 258 | |
| 259 | private: |
| 260 | void |
nothing calls this directly
no test coverage detected