3#include <xrpld/peerfinder/PeerfinderManager.h>
4#include <xrpld/peerfinder/Slot.h>
6#include <xrpl/beast/container/aged_unordered_map.h>
std::chrono::steady_clock::time_point time_point
A version-independent IP address and port combination.
beast::aged_unordered_map< beast::IP::Endpoint, std::uint32_t > cache_
RecentT(clock_type &clock)
bool filter(beast::IP::Endpoint const &ep, std::uint32_t hops)
Returns true if we should not send endpoint to the slot.
void insert(beast::IP::Endpoint const &ep, std::uint32_t hops)
Called for each valid endpoint received for a slot.
static constexpr std::int32_t kUnknownPort
bool fixed() const override
Returns true if this is a fixed connection.
void localEndpoint(beast::IP::Endpoint const &endpoint)
class xrpl::PeerFinder::SlotImp::RecentT recent
std::shared_ptr< SlotImp > ptr
bool reserved() const override
Returns true if this is a reserved connection.
SlotImp(beast::IP::Endpoint const &localEndpoint, beast::IP::Endpoint remoteEndpoint, bool fixed, clock_type &clock)
std::string prefix() const
void remoteEndpoint(beast::IP::Endpoint const &endpoint)
std::atomic< std::int32_t > listeningPort_
void setListeningPort(std::uint16_t port)
std::optional< beast::IP::Endpoint > const & localEndpoint() const override
The local endpoint of the socket, when known.
void reserved(bool reserved)
State state() const override
Returns the state of the connection.
std::optional< PublicKey > const & publicKey() const override
The peer's public key, when known.
bool connectivityCheckInProgress
std::optional< PublicKey > publicKey_
clock_type::time_point whenAcceptEndpoints
beast::IP::Endpoint const & remoteEndpoint() const override
The remote endpoint of socket.
bool inbound() const override
Returns true if this is an inbound connection.
beast::IP::Endpoint remoteEndpoint_
std::optional< beast::IP::Endpoint > localEndpoint_
void publicKey(PublicKey const &key)
std::optional< std::uint16_t > listeningPort() const override
void activate(clock_type::time_point const &now)
Properties and state associated with a peer to peer overlay connection.
detail::AgedUnorderedContainer< false, true, Key, T, Clock, Hash, KeyEqual, Allocator > aged_unordered_map
beast::AbstractClock< std::chrono::steady_clock > clock_type
std::string getFingerprint(beast::IP::Endpoint const &address, std::optional< PublicKey > const &publicKey=std::nullopt, std::optional< std::string > const &id=std::nullopt)