My Project 3.2.0
C++ Distributed Hash Table
Loading...
Searching...
No Matches
Public Attributes | List of all members
dht::Config Struct Reference

#include <callbacks.h>

Collaboration diagram for dht::Config:
Collaboration graph
[legend]

Public Attributes

InfoHash node_id {}
 
NetId network {0}
 
bool is_bootstrap {false}
 
bool maintain_storage {false}
 
std::string persist_path {}
 
ssize_t max_req_per_sec {0}
 
ssize_t max_peer_req_per_sec {0}
 
ssize_t max_searches {0}
 
ssize_t max_store_size {0}
 
ssize_t max_store_keys {0}
 
bool public_stable {false}
 
bool client_mode {false}
 

Detailed Description

Dht configuration.

Definition at line 105 of file callbacks.h.

Member Data Documentation

◆ client_mode

bool dht::Config::client_mode {false}

Definition at line 148 of file callbacks.h.

◆ is_bootstrap

bool dht::Config::is_bootstrap {false}

For testing purposes only, enables bootstrap mode

Definition at line 117 of file callbacks.h.

◆ maintain_storage

bool dht::Config::maintain_storage {false}

Makes the DHT responsible to maintain its stored values. Consumes more ressources.

Definition at line 120 of file callbacks.h.

◆ max_peer_req_per_sec

ssize_t dht::Config::max_peer_req_per_sec {0}

If non-0, overrides the default per-IP address rate-limit. -1 means no limit.

Definition at line 129 of file callbacks.h.

◆ max_req_per_sec

ssize_t dht::Config::max_req_per_sec {0}

If non-0, overrides the default global rate-limit. -1 means no limit.

Definition at line 126 of file callbacks.h.

◆ max_searches

ssize_t dht::Config::max_searches {0}

Definition at line 132 of file callbacks.h.

◆ max_store_keys

ssize_t dht::Config::max_store_keys {0}

Definition at line 138 of file callbacks.h.

◆ max_store_size

ssize_t dht::Config::max_store_size {0}

Definition at line 135 of file callbacks.h.

◆ network

NetId dht::Config::network {0}

DHT network ID. A node will only talk with other nodes having the same network ID. Network ID 0 (default) represents the main public network.

Definition at line 114 of file callbacks.h.

◆ node_id

InfoHash dht::Config::node_id {}

DHT node ID

Definition at line 107 of file callbacks.h.

◆ persist_path

std::string dht::Config::persist_path {}

If set, the dht will load its state from this file on start and save its state in this file on shutdown

Definition at line 123 of file callbacks.h.

◆ public_stable

bool dht::Config::public_stable {false}

Use appropriate bahavior for a public IP, stable node:

  • No connectivity change triggered when a search fails
  • Larger listen refresh time

Definition at line 145 of file callbacks.h.


The documentation for this struct was generated from the following file: