MCPcopy Create free account
hub / github.com/TelegramMessenger/cocoon / init_http_server

Function init_http_server

boost-http/http.cpp:368–376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

366static std::vector<std::thread> threads;
367
368void init_http_server(td::uint16 port, std::shared_ptr<HttpCallback> callback) {
369 std::make_shared<cocoon::http::HttpListener>(io, boost::asio::ip::tcp::endpoint(boost::asio::ip::tcp::v4(), port),
370 std::move(callback))
371 ->run();
372
373 for (int i = 0; i < 10; ++i) {
374 threads.emplace_back([&] { io.run(); });
375 }
376}
377
378boost::asio::io_context &io_context() {
379 return io;

Callers 1

Calls 1

runMethod · 0.45

Tested by

no test coverage detected