summaryrefslogtreecommitdiff
path: root/src/lib/server.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-03-17 01:25:02 +0100
committerCarl Hetherington <cth@carlh.net>2025-03-22 13:29:58 +0100
commit9dd72fc481349f0b5ce985164441eecfa6485c19 (patch)
treed8136ef6d6b660a5a411722a128d0e309333ff3d /src/lib/server.cc
parent169c47ede14b6e86e054871a56ffa048357b4463 (diff)
Add abstraction of io_{context,service} and use it as appropriate.
Diffstat (limited to 'src/lib/server.cc')
-rw-r--r--src/lib/server.cc6
1 files changed, 3 insertions, 3 deletions
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();
}