mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
dht: support client mode
In client mode, a node won't store data and won't participate in routing.
This commit is contained in:
1 parent
4ce0168916
commit
e20ae56cab
6 files changed
+28
-19
No files matched your search
+2
-3
@@ -31,9 +31,8 @@ constexpr std::chrono::minutes Node::NODE_GOOD_TIME;
|
||||
constexpr std::chrono::seconds Node::MAX_RESPONSE_TIME;
|
||||
|
||||
|
||||
Node::Node(const InfoHash& id, const SockAddr& addr)
|
||||
: id(id),
|
||||
addr(addr)
|
||||
Node::Node(const InfoHash& id, const SockAddr& addr, bool client)
|
||||
: id(id), addr(addr), is_client(client)
|
||||
{
|
||||
crypto::random_device rd;
|
||||
transaction_id = TransactionDist{1}(rd);
|
||||
|
||||
Reference in new issue
Block a user