xrpld
Loading...
Searching...
No Matches
libxrpl
peerfinder
Endpoint.cpp
1
#include <xrpl/beast/net/IPEndpoint.h>
2
#include <xrpl/peerfinder/Types.h>
3
4
#include <
algorithm
>
5
#include <
cstdint
>
6
#include <
utility
>
7
8
namespace
xrpl::peer_finder
{
9
10
Endpoint::Endpoint
(
beast::ip::Endpoint
ep,
std::uint32_t
hops
)
11
:
hops
(
std
::min(
hops
,
tuning
::kMaxHops + 1)),
address
(
std
::move(ep))
12
{
13
}
14
15
}
// namespace xrpl::peer_finder
algorithm
beast::ip::Endpoint
A version-independent IP address and port combination.
Definition
IPEndpoint.h:24
cstdint
std::uint32_t
std
STL namespace.
xrpl::peer_finder::tuning
Heuristically tuned constants.
Definition
include/xrpl/peerfinder/detail/Tuning.h:12
xrpl::peer_finder
Definition
include/xrpl/peerfinder/Config.h:12
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
utility
Generated by
1.16.1