From cc01e19e8f3a8bbb8db7d3103fcec16854b11626 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 19 Dec 2018 23:04:50 +0100 Subject: Add option to force route data --- include/sibs/DirectConnection.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include/sibs/DirectConnection.hpp') 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> connectionResults; std::mutex connectionResultsMutex; + ConnectionOptions options; struct UPNPUrlData { -- cgit v1.2.3