3#include <xrpl/beast/hash/hash_append.h>
4#include <xrpl/beast/hash/uhash.h>
5#include <xrpl/beast/net/IPAddress.h>
112 template <
class Hasher>
174template <
typename OutputStream>
200 return ::beast::Uhash<>{}(endpoint);
215 return ::beast::Uhash<>{}(endpoint);
A version-independent IP address and port combination.
bool isV4() const
Convenience accessors for the address part.
Address const & address() const
Returns the address portion of this endpoint.
friend bool operator>(Endpoint const &lhs, Endpoint const &rhs)
static std::optional< Endpoint > fromStringChecked(std::string const &s)
Create an Endpoint from a string.
Endpoint()
Create an unspecified endpoint.
friend bool operator!=(Endpoint const &lhs, Endpoint const &rhs)
friend bool operator<(Endpoint const &lhs, Endpoint const &rhs)
Endpoint atPort(Port port) const
Returns a new Endpoint with a different port.
friend void hash_append(Hasher &h, Endpoint const &endpoint)
std::string toString() const
Returns a string representing the endpoint.
friend bool operator<=(Endpoint const &lhs, Endpoint const &rhs)
Port port() const
Returns the port number on the endpoint.
static Endpoint fromString(std::string const &s)
friend bool operator>=(Endpoint const &lhs, Endpoint const &rhs)
friend bool operator==(Endpoint const &lhs, Endpoint const &rhs)
Arithmetic comparison.
bool isMulticast(Address const &addr)
Returns true if the address is a multicast address.
bool isPublic(Address const &addr)
Returns true if the address is a public routable address.
bool isLoopback(Address const &addr)
Returns true if this is a loopback address.
boost::asio::ip::address_v4 AddressV4
OutputStream & operator<<(OutputStream &os, Endpoint const &endpoint)
Output stream conversion.
bool isUnspecified(Address const &addr)
Returns true if the address is unspecified.
std::istream & operator>>(std::istream &is, Endpoint &endpoint)
Input stream conversion.
bool isPrivate(Address const &addr)
Returns true if the address is a private unroutable address.
boost::asio::ip::address Address
std::string to_string(Address const &addr)
Returns the address represented as a string.
boost::asio::ip::address_v6 AddressV6
std::enable_if_t< IsContiguouslyHashable< T, Hasher >::value > hash_append(Hasher &h, T const &t) noexcept
Logically concatenate input data to a Hasher.
std::size_t operator()(::beast::IP::Endpoint const &endpoint) const
std::size_t operator()(::beast::IP::Endpoint const &endpoint) const