3#include <xrpl/beast/container/aged_unordered_map.h>
4#include <xrpl/beast/net/IPEndpoint.h>
5#include <xrpl/peerfinder/Slot.h>
6#include <xrpl/peerfinder/Types.h>
7#include <xrpl/protocol/PublicKey.h>
std::chrono::steady_clock::time_point time_point
A version-independent IP address and port combination.
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.
beast::aged_unordered_map< beast::ip::Endpoint, std::uint32_t > cache_
std::atomic< std::int32_t > listeningPort_
bool connectivityCheckInProgress
void reserved(bool reserved)
class xrpl::peer_finder::SlotImp::RecentT recent
std::shared_ptr< SlotImp > ptr
std::optional< beast::ip::Endpoint > const & localEndpoint() const override
The local endpoint of the socket, when known.
State state() const override
Returns the state of the connection.
std::optional< PublicKey > const & publicKey() const override
The peer's public key, when known.
beast::ip::Endpoint const & remoteEndpoint() const override
The remote endpoint of socket.
clock_type::time_point whenAcceptEndpoints
std::optional< PublicKey > publicKey_
SlotImp(beast::ip::Endpoint const &localEndpoint, beast::ip::Endpoint remoteEndpoint, bool fixed, clock_type &clock)
void setListeningPort(std::uint16_t port)
void localEndpoint(beast::ip::Endpoint const &endpoint)
void activate(clock_type::time_point const &now)
std::string prefix() const
bool reserved() const override
Returns true if this is a reserved connection.
std::optional< beast::ip::Endpoint > localEndpoint_
void remoteEndpoint(beast::ip::Endpoint const &endpoint)
bool fixed() const override
Returns true if this is a fixed connection.
bool inbound() const override
Returns true if this is an inbound connection.
static std::int32_t constexpr kUnknownPort
std::optional< std::uint16_t > listeningPort() const override
beast::ip::Endpoint remoteEndpoint_
void publicKey(PublicKey const &key)
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)