face: use move semantics for sockets where possible
Change-Id: I2af595073f862c570c1ce0dcb3717f3d2b9cfd71
Refs: #2613
diff --git a/daemon/face/ethernet-face.hpp b/daemon/face/ethernet-face.hpp
index e9f0e2a..2bbd781 100644
--- a/daemon/face/ethernet-face.hpp
+++ b/daemon/face/ethernet-face.hpp
@@ -60,12 +60,10 @@
Error(const std::string& what) : Face::Error(what) {}
};
- EthernetFace(const shared_ptr<boost::asio::posix::stream_descriptor>& socket,
+ EthernetFace(boost::asio::posix::stream_descriptor socket,
const NetworkInterfaceInfo& interface,
const ethernet::Address& address);
- ~EthernetFace() DECL_OVERRIDE;
-
/// send an Interest
void
sendInterest(const Interest& interest) DECL_OVERRIDE;
@@ -138,7 +136,7 @@
* @brief Returns the MTU of the underlying network interface
*/
size_t
- getInterfaceMtu() const;
+ getInterfaceMtu();
private:
struct Reassembler
@@ -148,7 +146,7 @@
};
unique_ptr<pcap_t, void(*)(pcap_t*)> m_pcap;
- shared_ptr<boost::asio::posix::stream_descriptor> m_socket;
+ boost::asio::posix::stream_descriptor m_socket;
#if defined(__linux__)
int m_interfaceIndex;