rippled
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations | Functions
ripple::PeerFinder Namespace Reference

Namespaces

namespace  detail
 
namespace  Tuning
 Heuristically tuned constants.
 

Classes

class  Bootcache
 Stores IP addresses useful for gaining initial connections. More...
 
class  Checker
 Tests remote listening sockets to make sure they are connectible. More...
 
struct  Config
 PeerFinder configuration settings. More...
 
class  ConnectHandouts
 Receives handouts for making automatic connections. More...
 
class  Counts
 Manages the count of available connections for the various slots. More...
 
struct  Endpoint
 Describes a connectible peer address along with some metadata. More...
 
class  Fixed
 Metadata for a Fixed slot. More...
 
class  Livecache
 The Livecache holds the short-lived relayed Endpoint messages. More...
 
class  Livecache_test
 
class  Logic
 The Logic for maintaining the list of Slot addresses. More...
 
class  Manager
 Maintains a set of IP addresses used for getting into the network. More...
 
class  ManagerImp
 
class  PeerFinder_test
 
class  RedirectHandouts
 Receives handouts for redirecting a connection. More...
 
class  Slot
 Properties and state associated with a peer to peer overlay connection. More...
 
class  SlotHandouts
 Receives endpoints for a slot during periodic handouts. More...
 
class  SlotImp
 
class  Source
 A static or dynamic source of peer addresses. More...
 
class  SourceStrings
 Provides addresses from a static set of strings. More...
 
class  SourceStringsImp
 
class  Store
 Abstract persistence for PeerFinder data. More...
 
class  StoreSqdb
 Database persistence for PeerFinder using SQLite. More...
 

Typedefs

using clock_type = beast::abstract_clock< std::chrono::steady_clock >
 
using IPAddresses = std::vector< beast::IP::Endpoint >
 Represents a set of addresses.
 
using Endpoints = std::vector< Endpoint >
 A set of Endpoint used for connecting.
 

Enumerations

enum class  Result {
  inboundDisabled , duplicatePeer , ipLimitExceeded , full ,
  success
}
 Possible results from activating a slot. More...
 

Functions

bool operator== (Endpoint const &a, Endpoint const &b)
 
 BEAST_DEFINE_TESTSUITE (Livecache, peerfinder, ripple)
 
 BEAST_DEFINE_TESTSUITE (PeerFinder, peerfinder, ripple)
 
template<class TargetFwdIter , class SeqFwdIter >
void handout (TargetFwdIter first, TargetFwdIter last, SeqFwdIter seq_first, SeqFwdIter seq_last)
 Distributes objects to targets according to business rules.
 
bool operator== (Config const &lhs, Config const &rhs)
 
std::unique_ptr< Managermake_Manager (boost::asio::io_context &io_context, clock_type &clock, beast::Journal journal, BasicConfig const &config, beast::insight::Collector::ptr const &collector)
 Create a new Manager.
 
bool operator< (Endpoint const &lhs, Endpoint const &rhs)
 
std::string_view to_string (Result result) noexcept
 Converts a Result enum value to its string representation.
 

Typedef Documentation

◆ clock_type

Definition at line 36 of file PeerfinderManager.h.

◆ IPAddresses

Represents a set of addresses.

Definition at line 39 of file PeerfinderManager.h.

◆ Endpoints

A set of Endpoint used for connecting.

Definition at line 137 of file PeerfinderManager.h.

Enumeration Type Documentation

◆ Result

enum class ripple::PeerFinder::Result
strong

Possible results from activating a slot.

Enumerator
inboundDisabled 
duplicatePeer 
ipLimitExceeded 
full 
success 

Definition at line 142 of file PeerfinderManager.h.

Function Documentation

◆ operator==() [1/2]

bool ripple::PeerFinder::operator== ( Endpoint const &  a,
Endpoint const &  b 
)

Definition at line 35 of file Livecache_test.cpp.

◆ BEAST_DEFINE_TESTSUITE() [1/2]

ripple::PeerFinder::BEAST_DEFINE_TESTSUITE ( Livecache  ,
peerfinder  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [2/2]

ripple::PeerFinder::BEAST_DEFINE_TESTSUITE ( PeerFinder  ,
peerfinder  ,
ripple   
)

◆ handout()

template<class TargetFwdIter , class SeqFwdIter >
void ripple::PeerFinder::handout ( TargetFwdIter  first,
TargetFwdIter  last,
SeqFwdIter  seq_first,
SeqFwdIter  seq_last 
)

Distributes objects to targets according to business rules.

A best effort is made to evenly distribute items in the sequence container list into the target sequence list.

Definition at line 68 of file Handouts.h.

◆ operator==() [2/2]

bool ripple::PeerFinder::operator== ( Config const &  lhs,
Config const &  rhs 
)

Definition at line 38 of file PeerfinderConfig.cpp.

◆ make_Manager()

std::unique_ptr< Manager > ripple::PeerFinder::make_Manager ( boost::asio::io_context &  io_context,
clock_type clock,
beast::Journal  journal,
BasicConfig const &  config,
beast::insight::Collector::ptr const &  collector 
)

Create a new Manager.

Definition at line 276 of file PeerfinderManager.cpp.

◆ operator<()

bool ripple::PeerFinder::operator< ( Endpoint const &  lhs,
Endpoint const &  rhs 
)

Definition at line 130 of file PeerfinderManager.h.

◆ to_string()

std::string_view ripple::PeerFinder::to_string ( Result  result)
noexcept

Converts a Result enum value to its string representation.

This function provides a human-readable string for a given Result enum, which is useful for logging, debugging, or displaying status messages.

Parameters
resultThe Result enum value to convert.
Returns
A std::string_view representing the enum value. Returns "unknown" if the enum value is not explicitly handled.
Note
This function returns a std::string_view for performance. A std::string would need to allocate memory on the heap and copy the string literal into it every time the function is called.

Definition at line 165 of file PeerfinderManager.h.