aboutsummaryrefslogtreecommitdiff
path: root/include/sibs/BootstrapConnection.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/sibs/BootstrapConnection.hpp')
-rw-r--r--include/sibs/BootstrapConnection.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/sibs/BootstrapConnection.hpp b/include/sibs/BootstrapConnection.hpp
index 094ee32..e77222d 100644
--- a/include/sibs/BootstrapConnection.hpp
+++ b/include/sibs/BootstrapConnection.hpp
@@ -7,6 +7,12 @@
namespace sibs
{
+ class BootstrapConnectionException : public std::runtime_error
+ {
+ public:
+ BootstrapConnectionException(const std::string &errMsg) : std::runtime_error(errMsg) {}
+ };
+
class PubsubKeyAlreadyListeningException : public std::runtime_error
{
public:
@@ -19,6 +25,7 @@ namespace sibs
{
DISABLE_COPY(BootstrapConnection)
public:
+ // Throws BootstrapConnectionException on error
BootstrapConnection(const Ipv4 &bootstrapAddress);
// Throws PubsubKeyAlreadyListeningException if we are already listening on the key @pubsubKey
@@ -33,5 +40,6 @@ namespace sibs
PubsubKeyMap<BoostrapConnectionListenCallbackFunc> listenCallbackFuncs;
PubsubKeyMap<std::vector<std::shared_ptr<DirectConnectionPeer>>> subscribedPeers;
std::mutex listenerCallbackFuncMutex;
+ std::mutex subscribedPeersMutex;
};
}