From 590d00257009d947f29dda6040f95be4c10d84f6 Mon Sep 17 00:00:00 2001 From: dec05eba <0xdec05eba@gmail.com> 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/sibs') 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