40 const boost::string_ref host =
address.substr(0,
address.rfind(
':'));
44 if (host.ends_with(
".onion"))
46 if (host.ends_with(
".i2p"))
50 if (host.size() <
address.size())
Type not supported by get_network_address
expect< epee::net_utils::network_address > get_network_address(const boost::string_ref address, const std::uint16_t default_port)
boost::endian::big_uint32_t ip
boost::endian::big_uint16_t port
std::error_code make_error_code(error value) noexcept
static expect< i2p_address > make(boost::string_ref address, std::uint16_t default_port=0)
Outside of 0-65535 range.
static expect< tor_address > make(boost::string_ref address, std::uint16_t default_port=0)