Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::service::dns::DnsServer Class Referencefinal

DNS Server. More...

#include <DnsServer.h>

Public Member Functions

 DnsServer ()
 Constructor.
 
bool bind (const net::IPAddress::Ptr &address)
 Bind address.
 
void setCallback (const Callback &callback)
 Set callback.
 
void addUpstreamNameServer (const net::IPAddress::Ptr &address)
 Add upstream server.
 
bool addUpstreamNameServer (const std::string &ip, uint16_t port=53)
 Add upstream server.
 
void addRecord (const std::string &name, const net::IPAddress::Ptr &address)
 Add record.
 
bool startup ()
 Startup.
 
bool shutdown ()
 Shutdown.
 
int getLastError ()
 Get error code.
 
std::string getLastErrorMessage ()
 Get error message.
 

Private Attributes

Service::Ptr service
 

Detailed Description

DNS Server.

Constructor & Destructor Documentation

◆ DnsServer()

DnsServer::DnsServer ( )

Constructor.

References service.

Member Function Documentation

◆ addRecord()

void DnsServer::addRecord ( const std::string & name,
const net::IPAddress::Ptr & address )

Add record.

Parameters
nameDomain name
addressAddress

References COV, and service.

◆ addUpstreamNameServer() [1/2]

void DnsServer::addUpstreamNameServer ( const net::IPAddress::Ptr & address)

Add upstream server.

Parameters
addressAddress

References COV, and service.

◆ addUpstreamNameServer() [2/2]

bool DnsServer::addUpstreamNameServer ( const std::string & ip,
uint16_t port = 53 )

Add upstream server.

Parameters
ipAddress
portPort
Returns
Whether adding is successful

References COV, and service.

◆ bind()

bool DnsServer::bind ( const net::IPAddress::Ptr & address)

Bind address.

Parameters
addressAddress
Returns
Whether binding is successful

References COV, and service.

◆ getLastError()

int DnsServer::getLastError ( )

Get error code.

Returns
Error code

References service.

◆ getLastErrorMessage()

std::string DnsServer::getLastErrorMessage ( )

Get error message.

Returns
Error message

References service.

◆ setCallback()

void DnsServer::setCallback ( const Callback & callback)

Set callback.

Parameters
callbackCallback

References callback(), COV, and service.

◆ shutdown()

bool DnsServer::shutdown ( )

Shutdown.

Returns
Whether shutdown is successful

References service.

◆ startup()

bool DnsServer::startup ( )

Startup.

Returns
Whether startup is successful

References service.

Member Data Documentation

◆ service

Service::Ptr sese::service::dns::DnsServer::service
private

The documentation for this class was generated from the following files: