From 9a70f5d6f2cd16152c67cd065d7083edf0bff159 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 8 Jun 2018 02:13:30 +0200 Subject: Remove peer socket when disconnected --- include/sibs/DirectConnection.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/sibs/DirectConnection.hpp b/include/sibs/DirectConnection.hpp index 0e8b961..45ba5d9 100644 --- a/include/sibs/DirectConnection.hpp +++ b/include/sibs/DirectConnection.hpp @@ -57,7 +57,8 @@ namespace sibs private: std::shared_ptr connect(const Ipv4 &address, bool rendezvous, bool reuseAddr, PubSubReceiveDataCallback receiveDataCallbackFunc); void receiveData(); - bool receiveDataFromPeer(const int socket, char *output); + int receiveDataFromPeer(const int socket, char *output); + bool removePeer(int peerSocket); private: u16 port; int eid; -- cgit v1.2.3