MCPcopy Create free account
hub / github.com/boostorg/beast / run

Method run

example/http/server/flex/http_server_flex.cpp:419–439  ·  view source on GitHub ↗

Start the asynchronous operation

Source from the content-addressed store, hash-verified

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(

Callers

nothing calls this directly

Calls 4

bind_front_handlerFunction · 0.85
get_executorMethod · 0.45
async_handshakeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected