From 9dd72fc481349f0b5ce985164441eecfa6485c19 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 17 Mar 2025 01:25:02 +0100 Subject: Add abstraction of io_{context,service} and use it as appropriate. --- src/lib/server.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/server.cc') diff --git a/src/lib/server.cc b/src/lib/server.cc index 359234044..06d02e538 100644 --- a/src/lib/server.cc +++ b/src/lib/server.cc @@ -32,7 +32,7 @@ using std::shared_ptr; Server::Server (int port, int timeout) : _terminate (false) - , _acceptor (_io_service, boost::asio::ip::tcp::endpoint (boost::asio::ip::tcp::v4(), port)) + , _acceptor(_io_context, boost::asio::ip::tcp::endpoint (boost::asio::ip::tcp::v4(), port)) , _timeout (timeout) { @@ -49,7 +49,7 @@ void Server::run () { start_accept (); - _io_service.run (); + _io_context.run(); } @@ -94,5 +94,5 @@ Server::stop () if (auto s = _socket.lock()) { s->close(); } - _io_service.stop (); + _io_context.stop(); } -- cgit v1.2.3