face: use move semantics for sockets where possible
Change-Id: I2af595073f862c570c1ce0dcb3717f3d2b9cfd71
Refs: #2613
diff --git a/daemon/face/tcp-channel.hpp b/daemon/face/tcp-channel.hpp
index ba59dbe..5b5505a 100644
--- a/daemon/face/tcp-channel.hpp
+++ b/daemon/face/tcp-channel.hpp
@@ -88,7 +88,7 @@
private:
void
- createFace(const shared_ptr<boost::asio::ip::tcp::socket>& socket,
+ createFace(boost::asio::ip::tcp::socket socket,
const FaceCreatedCallback& onFaceCreated,
bool isOnDemand);
@@ -98,7 +98,6 @@
void
handleAccept(const boost::system::error_code& error,
- const shared_ptr<boost::asio::ip::tcp::socket>& socket,
const FaceCreatedCallback& onFaceCreated,
const ConnectFailedCallback& onConnectFailed);
@@ -116,8 +115,9 @@
private:
std::map<tcp::Endpoint, shared_ptr<Face>> m_channelFaces;
- boost::asio::ip::tcp::acceptor m_acceptor;
tcp::Endpoint m_localEndpoint;
+ boost::asio::ip::tcp::acceptor m_acceptor;
+ boost::asio::ip::tcp::socket m_acceptSocket;
};
inline bool