Sese Framework
2.3.0
A cross-platform framework
|
#include <Resolver.h>
Public Member Functions | |
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 Member Functions | |
std::vector< IPAddress::Ptr > | resolve (const IPAddress::Ptr &name_server, const std::string &hostname, uint16_t type) |
Private Attributes | |
std::vector< IPAddress::Ptr > | name_servers |
std::random_device | device |
std::mt19937 | generator |
DNS Resolver.
Resolver::Resolver | ( | ) |
void Resolver::addNameServer | ( | const IPAddress::Ptr & | ip_address | ) |
bool Resolver::addNameServer | ( | const std::string & | ip, |
uint16_t | port = 53 ) |
Add NameServer
ip | IP |
port | Port |
References sese::net::IPAddress::create(), and name_servers.
Referenced by sese::internal::net::service::dns::DnsService::addUpstreamNameServer(), and sese::internal::net::service::dns::DnsService::addUpstreamNameServer().
|
private |
std::vector< sese::net::IPAddress::Ptr > Resolver::resolve | ( | const std::string & | hostname, |
uint16_t | type ) |
Resolve domain name
hostname | Domain name |
type | Type (sese::net::dns::TYPE_A || sese::net::dns::TYPE_AAAA) |
References name_servers, and resolve().
|
private |
|
private |
Referenced by resolve().
|
private |
Referenced by addNameServer(), addNameServer(), and resolve().