diff options
author | dec05eba <0xdec05eba@gmail.com> | 2018-10-16 05:23:12 +0200 |
---|---|---|
committer | dec05eba <0xdec05eba@gmail.com> | 2018-10-16 05:23:14 +0200 |
commit | e0511ecead4d98ed84e18960a2f23cfe707b5a28 (patch) | |
tree | ef07ffb6234c868f78a642ef29c724d9edeac0ec /include | |
parent | eda94456add9a65d1821302e343bef4021d2a773 (diff) |
Add more state functions
Diffstat (limited to 'include')
-rw-r--r-- | include/sibs/BootstrapConnection.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/sibs/BootstrapConnection.hpp b/include/sibs/BootstrapConnection.hpp index 08af775..9e2dfff 100644 --- a/include/sibs/BootstrapConnection.hpp +++ b/include/sibs/BootstrapConnection.hpp @@ -35,13 +35,14 @@ namespace sibs // Throws BootstrapConnectionException on error BootstrapConnection(const Ipv4 &bootstrapAddress); - // Throws PubsubKeyAlreadyListeningException if we are already listening on the key @pubsubKey + // If we are already listening on the key @pubsubKey then the callback function is overwritten ListenHandle listen(const PubsubKey &pubsubKey, BoostrapConnectionListenCallbackFunc callbackFunc); // Returns false if data is larger than 800kb. // Note: @data is copied in this function. // Note: You can't put data on a pubsubkey that you are not listening on. Call @listen first. bool put(const PubsubKey &pubsubKey, const void *data, const usize size); bool cancelListen(const ListenHandle &listener); + bool areWeListeningOnKey(const PubsubKey &pubsubKey); std::vector<std::shared_ptr<DirectConnectionPeer>> getPeers(); private: |