xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
include
xrpl
peerfinder
peerfinder/Types.h
1
#pragma once
2
3
#include <xrpl/beast/clock/abstract_clock.h>
4
#include <xrpl/beast/net/IPEndpoint.h>
5
#include <xrpl/peerfinder/detail/Tuning.h>
6
7
#include <
chrono
>
8
#include <
cstdint
>
9
#include <
vector
>
10
11
namespace
xrpl::peer_finder
{
12
13
using
ClockType
=
beast::AbstractClock<std::chrono::steady_clock>
;
14
18
using
IPAddresses
=
std::vector<beast::ip::Endpoint>
;
19
20
//------------------------------------------------------------------------------
21
25
struct
Endpoint
26
{
27
Endpoint
() =
default
;
28
29
Endpoint
(
beast::ip::Endpoint
ep,
std::uint32_t
hops
);
30
31
std::uint32_t
hops
= 0;
32
beast::ip::Endpoint
address
;
33
};
34
35
inline
bool
36
operator<
(
Endpoint
const
& lhs,
Endpoint
const
& rhs)
37
{
38
return
lhs.
address
< rhs.
address
;
39
}
40
44
using
Endpoints
=
std::vector<Endpoint>
;
45
46
}
// namespace xrpl::peer_finder
chrono
beast::AbstractClock
Abstract interface to a clock.
Definition
abstract_clock.h:36
beast::ip::Endpoint
A version-independent IP address and port combination.
Definition
IPEndpoint.h:24
cstdint
std::uint32_t
xrpl::peer_finder
Definition
include/xrpl/peerfinder/Config.h:12
xrpl::peer_finder::ClockType
beast::AbstractClock< std::chrono::steady_clock > ClockType
Definition
peerfinder/Types.h:13
xrpl::peer_finder::IPAddresses
std::vector< beast::ip::Endpoint > IPAddresses
Represents a set of addresses.
Definition
peerfinder/Types.h:18
xrpl::peer_finder::operator<
bool operator<(Endpoint const &lhs, Endpoint const &rhs)
Definition
peerfinder/Types.h:36
xrpl::peer_finder::Endpoints
std::vector< Endpoint > Endpoints
A set of Endpoint used for connecting.
Definition
peerfinder/Types.h:44
xrpl::peer_finder::Endpoint
Describes a connectable peer address along with some metadata.
Definition
peerfinder/Types.h:26
xrpl::peer_finder::Endpoint::hops
std::uint32_t hops
Definition
peerfinder/Types.h:31
xrpl::peer_finder::Endpoint::Endpoint
Endpoint()=default
xrpl::peer_finder::Endpoint::address
beast::ip::Endpoint address
Definition
peerfinder/Types.h:32
vector
Generated by
1.17.0