ESP8266
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
DNSClient Class Reference

Public Member Functions

void begin (const IPAddress &aDNSServer)
 
int inet_aton (const char *aIPAddrString, IPAddress &aResult)
 
int getHostByName (const char *aHostname, IPAddress &aResult)
 

Protected Member Functions

uint16_t BuildRequest (const char *aName)
 
uint16_t ProcessResponse (uint16_t aTimeout, IPAddress &aAddress)
 

Protected Attributes

IPAddress iDNSServer
 
uint16_t iRequestId
 
EthernetUDP iUdp
 

Member Function Documentation

void DNSClient::begin ( const IPAddress aDNSServer)
uint16_t DNSClient::BuildRequest ( const char *  aName)
protected
int DNSClient::getHostByName ( const char *  aHostname,
IPAddress aResult 
)

Resolve the given hostname to an IP address.

Parameters
aHostnameName to be resolved
aResultIPAddress structure to store the returned IP address
Returns
1 if aIPAddrString was successfully converted to an IP address, else error code
int DNSClient::inet_aton ( const char *  aIPAddrString,
IPAddress aResult 
)

Convert a numeric IP address string into a four-byte IP address.

Parameters
aIPAddrStringIP address to convert
aResultIPAddress structure to store the returned IP address
Returns
1 if aIPAddrString was successfully converted to an IP address, else error code
uint16_t DNSClient::ProcessResponse ( uint16_t  aTimeout,
IPAddress aAddress 
)
protected

Member Data Documentation

IPAddress DNSClient::iDNSServer
protected
uint16_t DNSClient::iRequestId
protected
EthernetUDP DNSClient::iUdp
protected