diff options
author | Razvan Becheriu <razvan@isc.org> | 2023-12-14 19:16:52 +0100 |
---|---|---|
committer | Razvan Becheriu <razvan@isc.org> | 2024-03-05 08:50:05 +0100 |
commit | 1b070fe4b53be34d34bdbfe59ec22d65b27fa982 (patch) | |
tree | ff4fa433d4739afe2e9944b46cbab587afd302c5 /src/lib/dhcp_ddns/ncr_udp.h | |
parent | [#3271] bump version in configure.ac to 2.5.7 (diff) | |
download | kea-1b070fe4b53be34d34bdbfe59ec22d65b27fa982.tar.xz kea-1b070fe4b53be34d34bdbfe59ec22d65b27fa982.zip |
[#3190] use smart pointer to capture IOService instance
Diffstat (limited to 'src/lib/dhcp_ddns/ncr_udp.h')
-rw-r--r-- | src/lib/dhcp_ddns/ncr_udp.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/lib/dhcp_ddns/ncr_udp.h b/src/lib/dhcp_ddns/ncr_udp.h index 01284aff7e..2b134238ba 100644 --- a/src/lib/dhcp_ddns/ncr_udp.h +++ b/src/lib/dhcp_ddns/ncr_udp.h @@ -110,7 +110,6 @@ #include <boost/shared_array.hpp> - /// responsibility of the completion handler to perform the steps necessary /// to interpret the raw data provided by the service outcome. The /// UDPCallback operator implementation is mostly a pass through. @@ -351,7 +350,7 @@ public: /// @param io_service the IOService which will monitor the socket. /// /// @throw NcrUDPError if the open fails. - virtual void open(isc::asiolink::IOService& io_service); + virtual void open(const isc::asiolink::IOServicePtr& io_service); /// @brief Closes the UDPSocket. /// @@ -397,7 +396,12 @@ public: /// the socket receive completion. void receiveCompletionHandler(const bool successful, const UDPCallback* recv_callback); + private: + + /// @brief The IO service used to handle events. + isc::asiolink::IOServicePtr io_service_; + /// @brief IP address on which to listen for requests. isc::asiolink::IOAddress ip_address_; @@ -431,7 +435,6 @@ private: //@} }; - /// @brief Provides the ability to send NameChangeRequests via UDP socket /// /// This class is a derivation of the NameChangeSender which is capable of @@ -469,7 +472,6 @@ public: /// @brief Destructor virtual ~NameChangeUDPSender(); - /// @brief Opens a UDP socket using the given IOService. /// /// Creates a NameChangeUDPSocket bound to the sender's IP address @@ -478,8 +480,7 @@ public: /// @param io_service the IOService which will monitor the socket. /// /// @throw NcrUDPError if the open fails. - virtual void open(isc::asiolink::IOService& io_service); - + virtual void open(const isc::asiolink::IOServicePtr& io_service); /// @brief Closes the UDPSocket. /// |