Start the asynchronous operation
| 417 | |
| 418 | // Start the asynchronous operation |
| 419 | void |
| 420 | run() |
| 421 | { |
| 422 | auto self = shared_from_this(); |
| 423 | // We need to be executing within a strand to perform async operations |
| 424 | // on the I/O objects in this session. |
| 425 | net::dispatch(stream_.get_executor(), [self]() { |
| 426 | // Set the timeout. |
| 427 | beast::get_lowest_layer(self->stream_).expires_after( |
| 428 | std::chrono::seconds(30)); |
| 429 | |
| 430 | // Perform the SSL handshake |
| 431 | // Note, this is the buffered version of the handshake. |
| 432 | self->stream_.async_handshake( |
| 433 | ssl::stream_base::server, |
| 434 | self->buffer_.data(), |
| 435 | beast::bind_front_handler( |
| 436 | &ssl_session::on_handshake, |
| 437 | self)); |
| 438 | }); |
| 439 | } |
| 440 | |
| 441 | void |
| 442 | on_handshake( |
nothing calls this directly
no test coverage detected