Sese Framework
x.y.z
A cross-platform framework
|
域名解析器 更多...
#include <Resolver.h>
Public 成员函数 | |
Resolver () | |
bool | addNameServer (const std::string &ip, uint16_t port=53) |
void | addNameServer (const IPAddress::Ptr &ip_address) |
std::vector< IPAddress::Ptr > | resolve (const std::string &hostname, uint16_t type) |
Private 成员函数 | |
std::vector< IPAddress::Ptr > | resolve (const IPAddress::Ptr &name_server, const std::string &hostname, uint16_t type) |
Private 属性 | |
std::vector< IPAddress::Ptr > | name_servers |
std::random_device | device |
std::mt19937 | generator |
域名解析器
Resolver::Resolver | ( | ) |
void Resolver::addNameServer | ( | const IPAddress::Ptr & | ip_address | ) |
bool Resolver::addNameServer | ( | const std::string & | ip, |
uint16_t | port = 53 ) |
添加 NameServer
ip | IP |
port | 端口 |
引用了 sese::net::IPAddress::create() , 以及 name_servers.
被这些函数引用 sese::internal::net::service::dns::DnsService::addUpstreamNameServer() , 以及 sese::internal::net::service::dns::DnsService::addUpstreamNameServer().
|
private |
std::vector< sese::net::IPAddress::Ptr > Resolver::resolve | ( | const std::string & | hostname, |
uint16_t | type ) |
解析域名
hostname | 域名 |
type | 类型 (sese::net::dns::TYPE_A || sese::net::dns::TYPE_AAAA) |
引用了 name_servers , 以及 resolve().
|
private |
|
private |
被这些函数引用 resolve().
|
private |
被这些函数引用 addNameServer(), addNameServer() , 以及 resolve().