forked from boostorg/beast
Replace uses of net::spawn with asio::spawn
`asio::spawn` is an extension, which is not part of the Networking TS, so the `net` alias is not appropriate in this case. Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
This commit is contained in:
@@ -153,7 +153,7 @@ int main(int argc, char** argv)
|
||||
load_root_certificates(ctx);
|
||||
|
||||
// Launch the asynchronous operation
|
||||
net::spawn(ioc, std::bind(
|
||||
boost::asio::spawn(ioc, std::bind(
|
||||
&do_session,
|
||||
std::string(host),
|
||||
std::string(port),
|
||||
|
||||
@@ -132,7 +132,7 @@ int main(int argc, char** argv)
|
||||
net::io_context ioc;
|
||||
|
||||
// Launch the asynchronous operation
|
||||
net::spawn(ioc, std::bind(
|
||||
boost::asio::spawn(ioc, std::bind(
|
||||
&do_session,
|
||||
std::string(host),
|
||||
std::string(port),
|
||||
|
||||
@@ -148,7 +148,7 @@ do_listen(
|
||||
if(ec)
|
||||
fail(ec, "accept");
|
||||
else
|
||||
net::spawn(
|
||||
boost::asio::spawn(
|
||||
acceptor.get_executor(),
|
||||
std::bind(
|
||||
&do_session,
|
||||
@@ -183,7 +183,7 @@ int main(int argc, char* argv[])
|
||||
load_server_certificate(ctx);
|
||||
|
||||
// Spawn a listening port
|
||||
net::spawn(ioc,
|
||||
boost::asio::spawn(ioc,
|
||||
std::bind(
|
||||
&do_listen,
|
||||
std::ref(ioc),
|
||||
|
||||
@@ -129,7 +129,7 @@ do_listen(
|
||||
if(ec)
|
||||
fail(ec, "accept");
|
||||
else
|
||||
net::spawn(
|
||||
boost::asio::spawn(
|
||||
acceptor.get_executor(),
|
||||
std::bind(
|
||||
&do_session,
|
||||
@@ -158,7 +158,7 @@ int main(int argc, char* argv[])
|
||||
net::io_context ioc(threads);
|
||||
|
||||
// Spawn a listening port
|
||||
net::spawn(ioc,
|
||||
boost::asio::spawn(ioc,
|
||||
std::bind(
|
||||
&do_listen,
|
||||
std::ref(ioc),
|
||||
|
||||
@@ -100,7 +100,7 @@ do_sync_session(websocket::stream<beast::tcp_stream>& ws)
|
||||
for(;;)
|
||||
{
|
||||
beast::flat_buffer buffer;
|
||||
|
||||
|
||||
ws.read(buffer, ec);
|
||||
if(ec == websocket::error::closed)
|
||||
break;
|
||||
@@ -405,7 +405,7 @@ do_coro_listen(
|
||||
continue;
|
||||
}
|
||||
|
||||
net::spawn(
|
||||
boost::asio::spawn(
|
||||
acceptor.get_executor(),
|
||||
std::bind(
|
||||
&do_coro_session,
|
||||
@@ -456,7 +456,7 @@ int main(int argc, char* argv[])
|
||||
static_cast<unsigned short>(port + 1u)})->run();
|
||||
|
||||
// Create coro port
|
||||
net::spawn(ioc,
|
||||
boost::asio::spawn(ioc,
|
||||
std::bind(
|
||||
&do_coro_listen,
|
||||
std::ref(ioc),
|
||||
|
||||
Reference in New Issue
Block a user