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