face: use move semantics for sockets where possible
Change-Id: I2af595073f862c570c1ce0dcb3717f3d2b9cfd71
Refs: #2613
diff --git a/daemon/face/udp-face.hpp b/daemon/face/udp-face.hpp
index e73c1e1..333bae2 100644
--- a/daemon/face/udp-face.hpp
+++ b/daemon/face/udp-face.hpp
@@ -38,10 +38,9 @@
class UdpFace : public DatagramFace<boost::asio::ip::udp>
{
public:
- UdpFace(const shared_ptr<protocol::socket>& socket,
- bool isOnDemand, const time::seconds& idleTimeout);
-
- ~UdpFace() DECL_OVERRIDE;
+ UdpFace(const FaceUri& remoteUri, const FaceUri& localUri,
+ protocol::socket socket, bool isOnDemand,
+ const time::seconds& idleTimeout);
ndn::nfd::FaceStatus
getFaceStatus() const DECL_OVERRIDE;
@@ -53,7 +52,7 @@
private:
const time::seconds m_idleTimeout;
time::steady_clock::TimePoint m_lastIdleCheck;
- scheduler::EventId m_closeIfIdleEvent;
+ scheduler::ScopedEventId m_closeIfIdleEvent;
// friend because it needs to invoke protected Face::setOnDemand
friend class UdpChannel;