summaryrefslogtreecommitdiffstats
path: root/src/lib/config/client_connection.cc
diff options
context:
space:
mode:
authorRazvan Becheriu <razvan@isc.org>2023-12-14 19:16:52 +0100
committerRazvan Becheriu <razvan@isc.org>2024-03-05 08:50:05 +0100
commit1b070fe4b53be34d34bdbfe59ec22d65b27fa982 (patch)
treeff4fa433d4739afe2e9944b46cbab587afd302c5 /src/lib/config/client_connection.cc
parent[#3271] bump version in configure.ac to 2.5.7 (diff)
downloadkea-1b070fe4b53be34d34bdbfe59ec22d65b27fa982.tar.xz
kea-1b070fe4b53be34d34bdbfe59ec22d65b27fa982.zip
[#3190] use smart pointer to capture IOService instance
Diffstat (limited to 'src/lib/config/client_connection.cc')
-rw-r--r--src/lib/config/client_connection.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/config/client_connection.cc b/src/lib/config/client_connection.cc
index 6217c1aae1..6f53eca261 100644
--- a/src/lib/config/client_connection.cc
+++ b/src/lib/config/client_connection.cc
@@ -27,7 +27,7 @@ public:
/// @brief Constructor.
///
/// @param io_service Reference to the IO service.
- explicit ClientConnectionImpl(IOService& io_service);
+ explicit ClientConnectionImpl(const IOServicePtr& io_service);
/// @brief This method schedules timer or reschedules existing timer.
///
@@ -115,7 +115,7 @@ private:
long timeout_;
};
-ClientConnectionImpl::ClientConnectionImpl(IOService& io_service)
+ClientConnectionImpl::ClientConnectionImpl(const IOServicePtr& io_service)
: socket_(io_service), feed_(), current_command_(), timer_(io_service),
timeout_(0) {
}
@@ -268,7 +268,7 @@ ClientConnectionImpl::timeoutCallback(ClientConnection::Handler handler) {
terminate(boost::asio::error::timed_out, handler);
}
-ClientConnection::ClientConnection(asiolink::IOService& io_service)
+ClientConnection::ClientConnection(const IOServicePtr& io_service)
: impl_(new ClientConnectionImpl(io_service)) {
}
@@ -280,6 +280,5 @@ ClientConnection::start(const ClientConnection::SocketPath& socket_path,
impl_->start(socket_path, command, handler, timeout);
}
-
} // end of namespace config
} // end of namespace isc