rippled
|
PeerFinder configuration settings. More...
Public Member Functions | |
Config () | |
Create a configuration with default values. More... | |
std::size_t | calcOutPeers () const |
Returns a suitable value for outPeers according to the rules. More... | |
void | applyTuning () |
Adjusts the values so they follow the business rules. More... | |
void | onWrite (beast::PropertyStream::Map &map) |
Write the configuration into a property stream. More... | |
Static Public Member Functions | |
static Config | makeConfig (ripple::Config const &config, std::uint16_t port, bool validationPublicKey, int ipLimit) |
Make PeerFinder::Config from configuration parameters. More... | |
Public Attributes | |
std::size_t | maxPeers |
The largest number of public peer slots to allow. More... | |
std::size_t | outPeers |
The number of automatic outbound connections to maintain. More... | |
std::size_t | inPeers |
The number of automatic inbound connections to maintain. More... | |
bool | peerPrivate = true |
true if we want our IP address kept private. More... | |
bool | wantIncoming |
true if we want to accept incoming connections. More... | |
bool | autoConnect |
true if we want to establish connections automatically More... | |
std::uint16_t | listeningPort |
The listening port number. More... | |
std::string | features |
The set of features we advertise. More... | |
int | ipLimit |
Limit how many incoming connections we allow per IP. More... | |
PeerFinder configuration settings.
Definition at line 40 of file PeerfinderManager.h.
ripple::PeerFinder::Config::Config | ( | ) |
Create a configuration with default values.
Definition at line 26 of file PeerfinderConfig.cpp.
std::size_t ripple::PeerFinder::Config::calcOutPeers | ( | ) | const |
Returns a suitable value for outPeers according to the rules.
Definition at line 38 of file PeerfinderConfig.cpp.
void ripple::PeerFinder::Config::applyTuning | ( | ) |
Adjusts the values so they follow the business rules.
Definition at line 46 of file PeerfinderConfig.cpp.
void ripple::PeerFinder::Config::onWrite | ( | beast::PropertyStream::Map & | map | ) |
Write the configuration into a property stream.
Definition at line 66 of file PeerfinderConfig.cpp.
|
static |
Make PeerFinder::Config from configuration parameters.
config | server's configuration |
port | server's listening port |
validationPublicKey | true if validation public key is not empty |
ipLimit | limit of incoming connections per IP |
Definition at line 78 of file PeerfinderConfig.cpp.
std::size_t ripple::PeerFinder::Config::maxPeers |
The largest number of public peer slots to allow.
This includes both inbound and outbound, but does not include fixed peers.
Definition at line 46 of file PeerfinderManager.h.
std::size_t ripple::PeerFinder::Config::outPeers |
The number of automatic outbound connections to maintain.
Outbound connections are only maintained if autoConnect is true
.
Definition at line 52 of file PeerfinderManager.h.
std::size_t ripple::PeerFinder::Config::inPeers |
The number of automatic inbound connections to maintain.
Inbound connections are only maintained if wantIncoming is true
.
Definition at line 58 of file PeerfinderManager.h.
bool ripple::PeerFinder::Config::peerPrivate = true |
true
if we want our IP address kept private.
Definition at line 61 of file PeerfinderManager.h.
bool ripple::PeerFinder::Config::wantIncoming |
true
if we want to accept incoming connections.
Definition at line 64 of file PeerfinderManager.h.
bool ripple::PeerFinder::Config::autoConnect |
true
if we want to establish connections automatically
Definition at line 67 of file PeerfinderManager.h.
std::uint16_t ripple::PeerFinder::Config::listeningPort |
The listening port number.
Definition at line 70 of file PeerfinderManager.h.
std::string ripple::PeerFinder::Config::features |
The set of features we advertise.
Definition at line 73 of file PeerfinderManager.h.
int ripple::PeerFinder::Config::ipLimit |
Limit how many incoming connections we allow per IP.
Definition at line 76 of file PeerfinderManager.h.