1#ifndef MSTL_NETWORK_DNS_MESSAGE_HPP
2#define MSTL_NETWORK_DNS_MESSAGE_HPP
3#include "MSTL/core/container/vector.hpp"
5#include "MSTL/core/string/string.hpp"
6#include "dns_constants.hpp"
16 dns_record() =
default;
18 const DNS_RECORD t,
const DNS_QUERY c,
21 ttl(ttl_val), type(t), class_type(c) {}
24struct dns_query_result {
25 vector<dns_record> answers;
26 vector<dns_record> authorities;
27 vector<dns_record> additional;
28 DNS_RESPONSE response_code;
30 bool recursive_available;
33 bool is_success() const noexcept {
34 return response_code == DNS_RESPONSE::NON_ERROR;
46 dns_header() =
default;
unsigned int uint32_t
32位无符号整数类型
unsigned short uint16_t
16位无符号整数类型
duration< int64_t, milli > milliseconds
毫秒持续时间
#define _MSTL
全局命名空间MSTL前缀
#define MSTL_END_NAMESPACE__
结束全局命名空间MSTL
#define MSTL_BEGIN_NAMESPACE__
开始全局命名空间MSTL
constexpr Iterator2 move(Iterator1 first, Iterator1 last, Iterator2 result)
移动范围元素