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.
void insert(beast::IP::Endpoint const &ep, std::uint32_t hops)
Called for each valid endpoint received for a slot.
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
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)
class xrpl::PeerFinder::SlotImp::recent_t recent
bool fixed() const override
Returns true if this is a fixed connection.
void set_listening_port(std::uint16_t port)
void reserved(bool reserved_)
bool reserved() const override
Returns true if this is a reserved connection.
beast::IP::Endpoint const & remote_endpoint() const override
The remote endpoint of socket.
void remote_endpoint(beast::IP::Endpoint const &endpoint)
std::string prefix() const
std::atomic< std::int32_t > m_listening_port
std::optional< std::uint16_t > listening_port() const override
std::optional< PublicKey > const & public_key() const override
The peer's public key, when known.
std::optional< PublicKey > m_public_key
State state() const override
Returns the state of the connection.
bool connectivityCheckInProgress
clock_type::time_point whenAcceptEndpoints
static std::int32_t constexpr unknownPort
bool inbound() const override
Returns true if this is an inbound connection.
void public_key(PublicKey const &key)
beast::IP::Endpoint m_remote_endpoint
std::optional< beast::IP::Endpoint > m_local_endpoint
void activate(clock_type::time_point const &now)
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)