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

Method on_detect

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

Source from the content-addressed store, hash-verified

513 }
514
515 void
516 on_detect(beast::error_code ec, bool result)
517 {
518 if(ec)
519 return fail(ec, "detect");
520
521 if(result)
522 {
523 // Launch SSL session
524 std::make_shared<ssl_session>(
525 stream_.release_socket(),
526 ctx_,
527 std::move(buffer_),
528 doc_root_)->run();
529 return;
530 }
531
532 // Launch plain session
533 std::make_shared<plain_session>(
534 stream_.release_socket(),
535 std::move(buffer_),
536 doc_root_)->run();
537 }
538};
539
540// Accepts incoming connections and launches the sessions

Callers

nothing calls this directly

Calls 3

moveClass · 0.85
failFunction · 0.70
runMethod · 0.45

Tested by

no test coverage detected