Monero
Loading...
Searching...
No Matches
epee::net_utils::network_address Class Reference

#include <net_utils_base.h>

Classes

struct  interface
struct  implementation

Public Member Functions

 network_address ()
template<typename T>
 network_address (const T &src)
bool equal (const network_address &other) const
bool less (const network_address &other) const
bool is_same_host (const network_address &other) const
std::string str () const
std::string host_str () const
bool is_loopback () const
bool is_local () const
address_type get_type_id () const
zone get_zone () const
bool is_blockable () const
std::uint16_t port () const
template<typename Type>
const Typeas () const
 if (!epee::serialization::selector< is_store >::serialize(type, stg, hparent_section, "type")) return false
 switch (address_type(type))
 MERROR ("Unsupported network address type: "<<(unsigned) type)

Public Attributes

std::uint8_t type = std::uint8_t(is_store ? this_ref.get_type_id() : address_type::invalid)
return false

Static Public Attributes

static constexpr std::integral_constant< bool, is_store > is_store_ {}

Private Member Functions

template<typename Type>
Typeas_mutable () const
template<typename T, typename t_storage>
bool serialize_addr (std::false_type, t_storage &stg, typename t_storage::hsection hparent)
template<typename T, typename t_storage>
bool serialize_addr (std::true_type, t_storage &stg, typename t_storage::hsection hparent) const

Private Attributes

std::shared_ptr< interfaceself

Constructor & Destructor Documentation

◆ network_address() [1/2]

epee::net_utils::network_address::network_address ( )
inline

◆ network_address() [2/2]

template<typename T>
epee::net_utils::network_address::network_address ( const T & src)
inline

Member Function Documentation

◆ as()

template<typename Type>
const Type & epee::net_utils::network_address::as ( ) const
inline

◆ as_mutable()

template<typename Type>
Type & epee::net_utils::network_address::as_mutable ( ) const
inlineprivate

◆ equal()

bool epee::net_utils::network_address::equal ( const network_address & other) const

◆ get_type_id()

address_type epee::net_utils::network_address::get_type_id ( ) const
inline

◆ get_zone()

zone epee::net_utils::network_address::get_zone ( ) const
inline

◆ host_str()

std::string epee::net_utils::network_address::host_str ( ) const
inline

◆ if()

epee::net_utils::network_address::if ( !epee::serialization::selector< is_store > ::serializetype, stg, hparent_section, "type")

◆ is_blockable()

bool epee::net_utils::network_address::is_blockable ( ) const
inline

◆ is_local()

bool epee::net_utils::network_address::is_local ( ) const
inline

◆ is_loopback()

bool epee::net_utils::network_address::is_loopback ( ) const
inline

◆ is_same_host()

bool epee::net_utils::network_address::is_same_host ( const network_address & other) const

◆ less()

bool epee::net_utils::network_address::less ( const network_address & other) const

◆ MERROR()

epee::net_utils::network_address::MERROR ( "Unsupported network address type: "<<(unsigned) type)

◆ port()

std::uint16_t epee::net_utils::network_address::port ( ) const
inline

◆ serialize_addr() [1/2]

template<typename T, typename t_storage>
bool epee::net_utils::network_address::serialize_addr ( std::false_type ,
t_storage & stg,
typename t_storage::hsection hparent )
inlineprivate

◆ serialize_addr() [2/2]

template<typename T, typename t_storage>
bool epee::net_utils::network_address::serialize_addr ( std::true_type ,
t_storage & stg,
typename t_storage::hsection hparent ) const
inlineprivate

◆ str()

std::string epee::net_utils::network_address::str ( ) const
inline

◆ switch()

epee::net_utils::network_address::switch ( address_type(type) )
inline

Member Data Documentation

◆ false

return epee::net_utils::network_address::false

◆ is_store_

std::integral_constant<bool, is_store> epee::net_utils::network_address::is_store_ {}
staticconstexpr

◆ self

std::shared_ptr<interface> epee::net_utils::network_address::self
private

◆ type

std::uint8_t epee::net_utils::network_address::type = std::uint8_t(is_store ? this_ref.get_type_id() : address_type::invalid)

The documentation for this class was generated from the following files: