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

Function main

demo_example/async_echo_server.cpp:67–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67int main(int argc, char* argv[]) {
68 try {
69 asio::io_context io_context;
70 std::thread thd([&io_context] {
71 asio::io_context::work work(io_context);
72 io_context.run();
73 });
74 AsioExecutor executor(io_context);
75 async_simple::coro::syncAwait(
76 start_server(io_context, 9980, &executor));
77 thd.join();
78 } catch (std::exception& e) {
79 std::cerr << "Exception: " << e.what() << "\n";
80 }
81
82 return 0;
83}

Callers

nothing calls this directly

Calls 5

syncAwaitFunction · 0.85
whatMethod · 0.80
start_serverFunction · 0.70
runMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected