aboutsummaryrefslogtreecommitdiff
path: root/include/sibs/BootstrapNode.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-06-07 22:00:42 +0200
committerdec05eba <dec05eba@protonmail.com>2020-08-18 22:56:48 +0200
commitc2187ca6b61c701c281cc528db43f6b97c50f3d8 (patch)
treef0baf317846902ae628c2e12cf8c25b6eb235c77 /include/sibs/BootstrapNode.hpp
parented71e8adf36e3d0c3f6f2b54794fe069091d3376 (diff)
Add bootstrap node, listen method
Diffstat (limited to 'include/sibs/BootstrapNode.hpp')
-rw-r--r--include/sibs/BootstrapNode.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sibs/BootstrapNode.hpp b/include/sibs/BootstrapNode.hpp
index eaf48eb..13a62e1 100644
--- a/include/sibs/BootstrapNode.hpp
+++ b/include/sibs/BootstrapNode.hpp
@@ -2,6 +2,8 @@
#include "DirectConnection.hpp"
#include "IpAddress.hpp"
+#include "PubsubKey.hpp"
+#include <vector>
namespace sibs
{
@@ -20,9 +22,11 @@ namespace sibs
~BootstrapNode();
private:
void acceptConnections();
+ void peerSubscribe(std::shared_ptr<DirectConnectionPeer> peer, const void *data, const usize size);
private:
DirectConnections connections;
int socket;
std::thread acceptConnectionsThread;
+ PubsubKeyMap<std::vector<std::shared_ptr<DirectConnectionPeer>>> subscribedPeers;
};
}