MySQL 8.0.40
Source Code Documentation
net::ip Namespace Reference

Classes

class  address
 
class  address_v4
 
class  address_v6
 IPv6 address with scope_id. More...
 
class  bad_address_cast
 
class  basic_address_iterator
 
class  basic_address_iterator< address_v4 >
 
class  basic_address_iterator< address_v6 >
 
class  basic_address_range
 
class  basic_address_range< address_v4 >
 
class  basic_address_range< address_v6 >
 
class  basic_endpoint
 
class  basic_resolver
 
class  basic_resolver_entry
 endpoint of IPv4/IPv6 based connection. More...
 
class  basic_resolver_results
 
class  network_v4
 
class  network_v6
 
class  resolver_base
 
class  tcp
 TCP protocol. More...
 
class  udp
 

Typedefs

using v6_only = socket_option::boolean< IPPROTO_IPV6, IPV6_V6ONLY >
 
using port_type = uint_least16_t
 
using scope_id_type = uint_least32_t
 
using address_v4_iterator = basic_address_iterator< address_v4 >
 
using address_v6_iterator = basic_address_iterator< address_v6 >
 
using address_v4_range = basic_address_range< address_v4 >
 
using address_v6_range = basic_address_range< address_v6 >
 

Enumerations

enum class  resolver_errc {
  try_again = EAI_AGAIN , bad_flags = EAI_BADFLAGS , fail = EAI_FAIL , bad_family = EAI_FAMILY ,
  out_of_memory = EAI_MEMORY , host_not_found = EAI_NONAME , service_not_found = EAI_SERVICE , bad_socktype = EAI_SOCKTYPE
}
 

Functions

const std::error_category & resolver_category () noexcept
 
std::error_code make_error_code (resolver_errc ec)
 
template<class T >
constexpr T host_to_network (const T t) noexcept
 convert an integer from host-endianness into network endianness. More...
 
template<class T >
constexpr T network_to_host (const T t) noexcept
 convert an integer from network-endianness into host endianness. More...
 
constexpr bool operator== (const address_v4 &a, const address_v4 &b) noexcept
 
constexpr bool operator!= (const address_v4 &a, const address_v4 &b) noexcept
 
constexpr bool operator< (const address_v4 &a, const address_v4 &b) noexcept
 
constexpr bool operator> (const address_v4 &a, const address_v4 &b) noexcept
 
constexpr bool operator<= (const address_v4 &a, const address_v4 &b) noexcept
 
constexpr bool operator>= (const address_v4 &a, const address_v4 &b) noexcept
 
constexpr bool operator== (const address_v6 &a, const address_v6 &b) noexcept
 
constexpr bool operator!= (const address_v6 &a, const address_v6 &b) noexcept
 
constexpr bool operator< (const address_v6 &a, const address_v6 &b) noexcept
 
constexpr bool operator> (const address_v6 &a, const address_v6 &b) noexcept
 
constexpr bool operator<= (const address_v6 &a, const address_v6 &b) noexcept
 
constexpr bool operator>= (const address_v6 &a, const address_v6 &b) noexcept
 
stdx::expected< address_v6, std::error_code > make_address_v6 (const char *str)
 make address_v6 from a string. More...
 
stdx::expected< address_v4, std::error_code > make_address_v4 (const char *str)
 make address_v4 from a string. More...
 
stdx::expected< address, std::error_code > make_address (const char *str)
 make address from a c-string. More...
 
stdx::expected< address, std::error_code > make_address (const std::string &str)
 make address from a string. More...
 
template<class CharT , class Traits >
std::basic_ostream< CharT, Traits > & operator<< (std::basic_ostream< CharT, Traits > &os, const address &addr)
 
constexpr bool operator== (const address &a, const address &b) noexcept
 
constexpr bool operator!= (const address &a, const address &b) noexcept
 
constexpr bool operator< (const address &a, const address &b) noexcept
 
template<class CharT , class Traits , class InternetProtocol >
std::basic_ostream< CharT, Traits > & operator<< (std::basic_ostream< CharT, Traits > &os, const basic_endpoint< InternetProtocol > &ep)
 
template<class InternetProtocol >
constexpr bool operator== (const basic_endpoint< InternetProtocol > &a, const basic_endpoint< InternetProtocol > &b) noexcept
 
template<class InternetProtocol >
constexpr bool operator!= (const basic_endpoint< InternetProtocol > &a, const basic_endpoint< InternetProtocol > &b) noexcept
 
constexpr bool operator== (const network_v4 &a, const network_v4 &b) noexcept
 
template<class CharT , class Traits >
std::basic_ostream< CharT, Traits > & operator<< (std::basic_ostream< CharT, Traits > &os, const network_v4 &net)
 
constexpr bool operator== (const network_v6 &a, const network_v6 &b) noexcept
 
template<class CharT , class Traits >
std::basic_ostream< CharT, Traits > & operator<< (std::basic_ostream< CharT, Traits > &os, const network_v6 &net)
 
constexpr bool operator== (const tcp &a, const tcp &b) noexcept
 
constexpr bool operator!= (const tcp &a, const tcp &b) noexcept
 
constexpr bool operator== (const udp &a, const udp &b) noexcept
 
constexpr bool operator!= (const udp &a, const udp &b) noexcept
 

Typedef Documentation

◆ address_v4_iterator

◆ address_v4_range

◆ address_v6_iterator

◆ address_v6_range

◆ port_type

using net::ip::port_type = typedef uint_least16_t

◆ scope_id_type

using net::ip::scope_id_type = typedef uint_least32_t

◆ v6_only

using net::ip::v6_only = typedef socket_option::boolean<IPPROTO_IPV6, IPV6_V6ONLY>

Enumeration Type Documentation

◆ resolver_errc

enum class net::ip::resolver_errc
strong
Enumerator
try_again 

name could not be resolved at this time

bad_flags 

flags parameter had an invalid value

fail 

non recoverable failed on name resolution

bad_family 

ai_family not supported

out_of_memory 

memory allocation failed

host_not_found 

NAME or SERVICE is unknown.

service_not_found 

SERVICE not supported for ai_socktype.

bad_socktype 

ai_socktype not supported

Function Documentation

◆ host_to_network()

template<class T >
constexpr T net::ip::host_to_network ( const T  t)
constexprnoexcept

convert an integer from host-endianness into network endianness.

constexpr version of htons()/htonl()

◆ make_address() [1/2]

stdx::expected< address, std::error_code > net::ip::make_address ( const char *  str)
inline

make address from a c-string.

Parameters
straddress string.
Returns
a address4 on success, std::error_code otherwise

◆ make_address() [2/2]

stdx::expected< address, std::error_code > net::ip::make_address ( const std::string &  str)
inline

make address from a string.

Parameters
straddress string.
Returns
a address4 on success, std::error_code otherwise

◆ make_address_v4()

stdx::expected< address_v4, std::error_code > net::ip::make_address_v4 ( const char *  str)
inline

make address_v4 from a string.

Parameters
straddress string.
Returns
a address_v4 on success, std::error_code otherwise

◆ make_address_v6()

stdx::expected< address_v6, std::error_code > net::ip::make_address_v6 ( const char *  str)
inline

make address_v6 from a string.

Parameters
straddress string.
Returns
a address_v6 on success, std::error_code otherwise

◆ make_error_code()

std::error_code net::ip::make_error_code ( resolver_errc  ec)
inline

◆ network_to_host()

template<class T >
constexpr T net::ip::network_to_host ( const T  t)
constexprnoexcept

convert an integer from network-endianness into host endianness.

constexpr version of ntohs()/ntohl()

◆ operator!=() [1/6]

constexpr bool net::ip::operator!= ( const address a,
const address b 
)
constexprnoexcept

◆ operator!=() [2/6]

constexpr bool net::ip::operator!= ( const address_v4 a,
const address_v4 b 
)
constexprnoexcept

◆ operator!=() [3/6]

constexpr bool net::ip::operator!= ( const address_v6 a,
const address_v6 b 
)
constexprnoexcept

◆ operator!=() [4/6]

template<class InternetProtocol >
constexpr bool net::ip::operator!= ( const basic_endpoint< InternetProtocol > &  a,
const basic_endpoint< InternetProtocol > &  b 
)
constexprnoexcept

◆ operator!=() [5/6]

constexpr bool net::ip::operator!= ( const tcp a,
const tcp b 
)
constexprnoexcept

◆ operator!=() [6/6]

constexpr bool net::ip::operator!= ( const udp a,
const udp b 
)
constexprnoexcept

◆ operator<() [1/3]

constexpr bool net::ip::operator< ( const address a,
const address b 
)
constexprnoexcept

◆ operator<() [2/3]

constexpr bool net::ip::operator< ( const address_v4 a,
const address_v4 b 
)
constexprnoexcept

◆ operator<() [3/3]

constexpr bool net::ip::operator< ( const address_v6 a,
const address_v6 b 
)
constexprnoexcept

◆ operator<<() [1/4]

template<class CharT , class Traits >
std::basic_ostream< CharT, Traits > & net::ip::operator<< ( std::basic_ostream< CharT, Traits > &  os,
const address addr 
)

◆ operator<<() [2/4]

template<class CharT , class Traits , class InternetProtocol >
std::basic_ostream< CharT, Traits > & net::ip::operator<< ( std::basic_ostream< CharT, Traits > &  os,
const basic_endpoint< InternetProtocol > &  ep 
)

◆ operator<<() [3/4]

template<class CharT , class Traits >
std::basic_ostream< CharT, Traits > & net::ip::operator<< ( std::basic_ostream< CharT, Traits > &  os,
const network_v4 net 
)

◆ operator<<() [4/4]

template<class CharT , class Traits >
std::basic_ostream< CharT, Traits > & net::ip::operator<< ( std::basic_ostream< CharT, Traits > &  os,
const network_v6 net 
)

◆ operator<=() [1/2]

constexpr bool net::ip::operator<= ( const address_v4 a,
const address_v4 b 
)
constexprnoexcept

◆ operator<=() [2/2]

constexpr bool net::ip::operator<= ( const address_v6 a,
const address_v6 b 
)
constexprnoexcept

◆ operator==() [1/8]

constexpr bool net::ip::operator== ( const address a,
const address b 
)
constexprnoexcept

◆ operator==() [2/8]

constexpr bool net::ip::operator== ( const address_v4 a,
const address_v4 b 
)
constexprnoexcept

◆ operator==() [3/8]

constexpr bool net::ip::operator== ( const address_v6 a,
const address_v6 b 
)
constexprnoexcept

◆ operator==() [4/8]

template<class InternetProtocol >
constexpr bool net::ip::operator== ( const basic_endpoint< InternetProtocol > &  a,
const basic_endpoint< InternetProtocol > &  b 
)
constexprnoexcept

◆ operator==() [5/8]

constexpr bool net::ip::operator== ( const network_v4 a,
const network_v4 b 
)
constexprnoexcept

◆ operator==() [6/8]

constexpr bool net::ip::operator== ( const network_v6 a,
const network_v6 b 
)
constexprnoexcept

◆ operator==() [7/8]

constexpr bool net::ip::operator== ( const tcp a,
const tcp b 
)
constexprnoexcept

◆ operator==() [8/8]

constexpr bool net::ip::operator== ( const udp a,
const udp b 
)
constexprnoexcept

◆ operator>() [1/2]

constexpr bool net::ip::operator> ( const address_v4 a,
const address_v4 b 
)
constexprnoexcept

◆ operator>() [2/2]

constexpr bool net::ip::operator> ( const address_v6 a,
const address_v6 b 
)
constexprnoexcept

◆ operator>=() [1/2]

constexpr bool net::ip::operator>= ( const address_v4 a,
const address_v4 b 
)
constexprnoexcept

◆ operator>=() [2/2]

constexpr bool net::ip::operator>= ( const address_v6 a,
const address_v6 b 
)
constexprnoexcept

◆ resolver_category()

const std::error_category & net::ip::resolver_category ( )
inlinenoexcept