1#ifndef XRPL_PEERFINDER_SLOTIMP_H_INCLUDED
2#define XRPL_PEERFINDER_SLOTIMP_H_INCLUDED
4#include <xrpld/peerfinder/PeerfinderManager.h>
5#include <xrpld/peerfinder/Slot.h>
7#include <xrpl/beast/container/aged_unordered_map.h>
A version-independent IP address and port combination.
typename Clock::time_point time_point
Associative container where each element is also indexed by time.
bool filter(beast::IP::Endpoint const &ep, std::uint32_t hops)
Returns true if we should not send endpoint to the slot.
beast::aged_unordered_map< beast::IP::Endpoint, std::uint32_t > cache
void insert(beast::IP::Endpoint const &ep, std::uint32_t hops)
Called for each valid endpoint received for a slot.
class ripple::PeerFinder::SlotImp::recent_t recent
std::optional< beast::IP::Endpoint > const & local_endpoint() const override
The local endpoint of the socket, when known.
void local_endpoint(beast::IP::Endpoint const &endpoint)
bool fixed() const override
Returns true if this is a fixed connection.
std::optional< std::uint16_t > listening_port() const override
std::atomic< std::int32_t > m_listening_port
void activate(clock_type::time_point const &now)
static std::int32_t constexpr unknownPort
bool inbound() const override
Returns true if this is an inbound connection.
void public_key(PublicKey const &key)
bool connectivityCheckInProgress
beast::IP::Endpoint m_remote_endpoint
void reserved(bool reserved_)
std::optional< beast::IP::Endpoint > m_local_endpoint
void set_listening_port(std::uint16_t port)
State state() const override
Returns the state of the connection.
clock_type::time_point whenAcceptEndpoints
std::optional< PublicKey > m_public_key
std::string prefix() const
std::optional< PublicKey > const & public_key() const override
The peer's public key, when known.
void remote_endpoint(beast::IP::Endpoint const &endpoint)
beast::IP::Endpoint const & remote_endpoint() const override
The remote endpoint of socket.
bool reserved() const override
Returns true if this is a reserved connection.
Properties and state associated with a peer to peer overlay connection.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::string getFingerprint(beast::IP::Endpoint const &address, std::optional< PublicKey > const &publicKey=std::nullopt, std::optional< std::string > const &id=std::nullopt)