Back to Site
Loading...
Searching...
No Matches
config.h
Go to the documentation of this file.
1#pragma once
2
8#include <cstdint>
9#include <string>
10
11namespace librats {
12
13struct NodeConfig {
16 uint16_t listen_port = 0;
17 bool enable_listen = true;
18
27 std::string bind_address = "";
28
31 size_t reactor_threads = 1;
32
37 size_t max_peers = 0;
38
40 enum class Security { Noise, Plaintext };
42
47 std::string protocol_name = "librats";
48 std::string protocol_version = "1.0";
49
53 std::string data_dir = "";
54
60};
61
62} // namespace librats
Definition node.h:65
std::string bind_address
Interface to bind the listener to.
Definition config.h:27
Security security
Definition config.h:41
size_t reactor_threads
Number of reactor threads.
Definition config.h:31
uint16_t listen_port
Listen port for inbound peers.
Definition config.h:16
std::string data_dir
Directory for persistent state.
Definition config.h:53
bool enable_network_monitor
Watch the host for network configuration changes (interface up/down, IP add/remove,...
Definition config.h:59
Security
Secure channel to use for peer connections.
Definition config.h:40
size_t max_peers
Maximum number of established peers.
Definition config.h:37
std::string protocol_name
Application protocol identity.
Definition config.h:47
std::string protocol_version
Definition config.h:48