face/tcp: Fixing multiple accept on a channel
Also, this commit includes more thorough test for TCP channel (testing
if multiple connections can be made to the same channel).
Change-Id: I3b89a6d994b5b17286448013aa04a77c92c0267a
refs: #1134
diff --git a/daemon/face/tcp-channel.hpp b/daemon/face/tcp-channel.hpp
index 3e3d956..999f9c9 100644
--- a/daemon/face/tcp-channel.hpp
+++ b/daemon/face/tcp-channel.hpp
@@ -88,11 +88,14 @@
private:
void
- handleConnection(const boost::system::error_code& error,
- const shared_ptr<boost::asio::ip::tcp::socket>& socket,
- const FaceCreatedCallback& onFaceCreated,
- const ConnectFailedCallback& onConnectFailed,
- bool remoteConnection);
+ createFace(const shared_ptr<boost::asio::ip::tcp::socket>& socket,
+ const FaceCreatedCallback& onFaceCreated);
+
+ void
+ handleSuccessfulAccept(const boost::system::error_code& error,
+ const shared_ptr<boost::asio::ip::tcp::socket>& socket,
+ const FaceCreatedCallback& onFaceCreated,
+ const ConnectFailedCallback& onConnectFailed);
void
handleSuccessfulConnect(const boost::system::error_code& error,