forked from boostorg/beast
examples & tests use context instead of coroutine.
This commit is contained in:
committed by
Klemens Morgenstern
parent
1841a592d6
commit
99bceb5bff
@@ -74,12 +74,14 @@ snippets()
|
||||
{
|
||||
//[code_core_1_refresher_5s
|
||||
asio::spawn(
|
||||
sock.get_executor(),
|
||||
[&sock](net::yield_context yield)
|
||||
{
|
||||
std::size_t bytes_transferred = net::async_write(sock,
|
||||
net::const_buffer("Hello, world!", 13), yield);
|
||||
(void)bytes_transferred;
|
||||
});
|
||||
},
|
||||
asio::detached);
|
||||
//]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user