MCPcopy Create free account
hub / github.com/boostorg/asio / test_callback

Function test_callback

example/cpp20/operations/c_callback_wrapper.cpp:171–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169//------------------------------------------------------------------------------
170
171void test_callback()
172{
173 boost::asio::io_context io_context;
174
175 // Test our asynchronous operation using a lambda as a callback. We will use
176 // an io_context to obtain an associated executor.
177 async_read_input("Enter your name",
178 boost::asio::bind_executor(io_context,
179 [](const std::string& result)
180 {
181 std::cout << "Hello " << result << "\n";
182 }));
183
184 io_context.run();
185}
186
187//------------------------------------------------------------------------------
188

Callers 1

mainFunction · 0.70

Calls 2

async_read_inputFunction · 0.70
runMethod · 0.45

Tested by

no test coverage detected