aboutsummaryrefslogtreecommitdiff
path: root/include/sibs/DirectConnection.hpp
diff options
context:
space:
mode:
authorAleksi Lindeman <dec05eba@protonmail.com>2018-12-19 23:04:50 +0100
committerAleksi Lindeman <dec05eba@protonmail.com>2018-12-19 23:04:54 +0100
commit860ba7d92731fe64186521ca442a8c7e657e97e1 (patch)
treee9f34df14d26f5c18f4faa67bafcb229a3a43329 /include/sibs/DirectConnection.hpp
parente3373366bb81c57cdc3ec96c6936b6c9df535bb2 (diff)
Add option to force route data
Diffstat (limited to 'include/sibs/DirectConnection.hpp')
-rw-r--r--include/sibs/DirectConnection.hpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/sibs/DirectConnection.hpp b/include/sibs/DirectConnection.hpp
index 1ba8659..50fefb8 100644
--- a/include/sibs/DirectConnection.hpp
+++ b/include/sibs/DirectConnection.hpp
@@ -62,13 +62,18 @@ namespace sibs
bool operator == (const DirectConnectionPeer &other) const;
bool operator != (const DirectConnectionPeer &other) const;
};
+
+ struct ConnectionOptions
+ {
+ bool useP2p = true;
+ };
class DirectConnections
{
DISABLE_COPY(DirectConnections)
friend class BootstrapNode;
public:
- DirectConnections(u16 port = 0);
+ DirectConnections(u16 port = 0, const ConnectionOptions &options = ConnectionOptions());
~DirectConnections();
// Throws ConnectionException on error
@@ -103,6 +108,7 @@ namespace sibs
PubSubOnRemoveDisconnectedPeerCallback removeDisconnectedPeerCallback;
Ipv4Map<std::shared_future<PubSubConnectResult>> connectionResults;
std::mutex connectionResultsMutex;
+ ConnectionOptions options;
struct UPNPUrlData
{