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

Function test_callback

example/cpp14/operations/c_callback_wrapper.cpp:169–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.70

Calls 2

async_read_inputFunction · 0.70
runMethod · 0.45

Tested by

no test coverage detected