Sese Framework
x.y.z
A cross-platform framework
|
DNS 服务器 更多...
#include <DnsServer.h>
Public 成员函数 | |
DnsServer () | |
构造函数 | |
bool | bind (const net::IPAddress::Ptr &address) |
绑定地址 | |
void | setCallback (const Callback &callback) |
设置回调 | |
void | addUpstreamNameServer (const net::IPAddress::Ptr &address) |
添加上游服务器 | |
bool | addUpstreamNameServer (const std::string &ip, uint16_t port=53) |
添加上游服务器 | |
void | addRecord (const std::string &name, const net::IPAddress::Ptr &address) |
添加记录 | |
bool | startup () |
启动 | |
bool | shutdown () |
停止 | |
int | getLastError () |
获取错误码 | |
std::string | getLastErrorMessage () |
获取错误信息 | |
Private 属性 | |
Service::Ptr | service |
DNS 服务器
DnsServer::DnsServer | ( | ) |
构造函数
引用了 service.
void DnsServer::addRecord | ( | const std::string & | name, |
const net::IPAddress::Ptr & | address ) |
void DnsServer::addUpstreamNameServer | ( | const net::IPAddress::Ptr & | address | ) |
bool DnsServer::addUpstreamNameServer | ( | const std::string & | ip, |
uint16_t | port = 53 ) |
bool DnsServer::bind | ( | const net::IPAddress::Ptr & | address | ) |
int DnsServer::getLastError | ( | ) |
std::string DnsServer::getLastErrorMessage | ( | ) |
void DnsServer::setCallback | ( | const Callback & | callback | ) |
bool DnsServer::shutdown | ( | ) |
bool DnsServer::startup | ( | ) |
|
private |