|
NexusForce 1.0.0
A Modern C++ Library with extended functionality, web components, and utility libraries
|
DNS客户端类 更多...
#include <dns_client.hpp>
类 | |
| struct | config |
| DNS客户端配置 更多... | |
DNS客户端类
提供DNS查询服务的完整实现,支持缓存、超时控制和多种查询类型。
主要功能:
在文件 dns_client.hpp 第 45 行定义.
|
inline |
|
explicit |
| vector< dns_query_result > dns_client::batch_query | ( | const vector< string > & | domains, |
| dns_record::raw | type = dns_record::A ) |
| dns_query_result dns_client::query | ( | string_view | domain, |
| dns_record::raw | type = dns_record::A, | ||
| dns_query | qclass = dns_query::INTERNET ) |
执行DNS查询
| domain | 域名 |
| type | 记录类型(默认A记录) |
| qclass | 查询类(默认INTERNET) |
| dns_exception | 查询失败时抛出 |
引用了 dns_record::A , 以及 INTERNET.
| future< dns_query_result > dns_client::query_async | ( | const string & | domain, |
| dns_record::raw | type = dns_record::A, | ||
| dns_query | qclass = dns_query::INTERNET ) |
| vector< string > dns_client::resolve_a | ( | string_view | domain | ) |
解析A记录(IPv4地址)
| domain | 域名 |
| vector< string > dns_client::resolve_aaaa | ( | string_view | domain | ) |
解析AAAA记录(IPv6地址)
| domain | 域名 |
| vector< string > dns_client::resolve_cname | ( | string_view | domain | ) |
解析CNAME记录(别名)
| domain | 域名 |
| vector< string > dns_client::resolve_mx | ( | string_view | domain | ) |
解析MX记录(邮件交换器)
| domain | 域名 |
| vector< string > dns_client::resolve_txt | ( | string_view | domain | ) |
解析TXT记录(文本记录)
| domain | 域名 |
| string dns_client::reverse_query | ( | string_view | ip | ) |
反向查询(从IP获取域名)
| ip | IPv4地址 |
| dns_exception | IP地址无效时抛出 |
执行PTR记录查询,将IP地址转换为域名。 支持IPv4地址,IPv6支持有限。
|
inline |
|
inline |
|
inline |
|
inline |