#include <internet.h>
|
union { |
sockaddr_in v4 |
|
sockaddr_in6 v6 |
|
} | data_ |
|
◆ protocol_type
template<typename InternetProtocol >
◆ size_type
template<typename InternetProtocol >
◆ basic_endpoint() [1/3]
template<typename InternetProtocol >
default constructor.
protocol() is v4()
◆ basic_endpoint() [2/3]
template<typename InternetProtocol >
construct from protocol and port-number.
basic_endpoint(v4(), 80).
◆ basic_endpoint() [3/3]
template<typename InternetProtocol >
construct from address and port-number.
◆ address()
template<typename InternetProtocol >
get address of the endpoint.
◆ capacity()
template<typename InternetProtocol >
get capacity of the underlying sockaddr.
◆ data() [1/2]
template<typename InternetProtocol >
const pointer to the underlying sockaddr.
◆ data() [2/2]
template<typename InternetProtocol >
pointer to the underlying sockaddr.
◆ port()
template<typename InternetProtocol >
get port of the endpoint.
◆ protocol()
template<typename InternetProtocol >
get protocol of the endpoint.
◆ resize()
template<typename InternetProtocol >
set the size of valid data of the underlying sockaddr.
basic_endpoint<tcp> ep;
if (addrlen < ep.capacity()) {
memcpy(ep.data(), addr, addrlen);
ep.resize(addrlen);
}
- Parameters
-
- Exceptions
-
std::length_error | if n > capacity |
◆ size()
template<typename InternetProtocol >
size of the underlying sockaddr.
◆ v4
template<typename InternetProtocol >
◆ v6
template<typename InternetProtocol >
The documentation for this class was generated from the following file:
- router/src/harness/include/mysql/harness/net_ts/internet.h