diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-06-08 02:13:30 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-08-18 22:56:48 +0200 |
commit | 9a70f5d6f2cd16152c67cd065d7083edf0bff159 (patch) | |
tree | eda962bc1276dcd62cc9d2ee7e04ad70eefc0380 /include | |
parent | c2187ca6b61c701c281cc528db43f6b97c50f3d8 (diff) |
Remove peer socket when disconnected
Diffstat (limited to 'include')
-rw-r--r-- | include/sibs/DirectConnection.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
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<DirectConnectionPeer> 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; |