MCPcopy Create free account
hub / github.com/alibaba/async_simple / main

Function main

demo_example/http/coroutine_http/http_server.cpp:54–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52};
53
54int main(int argc, char* argv[]) {
55 try {
56 asio::io_context io_context;
57 std::thread thd([&io_context] {
58 asio::io_context::work work(io_context);
59 io_context.run();
60 });
61 http_server server(io_context, 9980);
62 async_simple::coro::syncAwait(server.start());
63 thd.join();
64 } catch (std::exception& e) {
65 std::cerr << "Exception: " << e.what() << "\n";
66 }
67
68 return 0;
69}

Callers

nothing calls this directly

Calls 5

syncAwaitFunction · 0.85
whatMethod · 0.80
runMethod · 0.45
startMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected