ID the MBED processor on the network if you have more than one. View MBED name on DHCP of your Router - Example \"MBED PE\" Change your ID in Core / host.h

Embed: (wiki syntax)

« Back to documentation index

DNSRequest Class Reference

DNSRequest Class Reference

This is a simple DNS Request class. More...

#include <DNSRequest.h>

Public Member Functions

 DNSRequest ()
 Creates a new request.
 ~DNSRequest ()
 Terminates and closes request.
DNSRequestErr resolve (const char *hostname)
 Resolves an hostname.
DNSRequestErr resolve (Host *pHost)
 Resolves an hostname.
void setOnReply (void(*pMethod)(DNSReply))
 Setups callback.
template<class T >
void setOnReply (T *pItem, void(T::*pMethod)(DNSReply))
 Setups callback.
DNSRequestErr getResult (IpAddr *pIp)
 Gets IP address once it has been resolved.
DNSRequestErr close ()
 Closes DNS Request before completion.
 DNSRequest ()
 Creates a new request.
 ~DNSRequest ()
 Terminates and closes request.
DNSRequestErr resolve (const char *hostname)
 Resolves an hostname.
DNSRequestErr resolve (Host *pHost)
 Resolves an hostname.
void setOnReply (void(*pMethod)(DNSReply))
 Setups callback.
template<class T >
void setOnReply (T *pItem, void(T::*pMethod)(DNSReply))
 Setups callback.
DNSRequestErr getResult (IpAddr *pIp)
 Gets IP address once it has been resolved.
DNSRequestErr close ()
 Closes DNS Request before completion.

Detailed Description

This is a simple DNS Request class.

This class exposes an API to deal with DNS Requests

Definition at line 66 of file LPC1768/api/DNSRequest.h.


Constructor & Destructor Documentation

DNSRequest (  )

Creates a new request.

~DNSRequest (  )

Terminates and closes request.

DNSRequest (  )

Creates a new request.

~DNSRequest (  )

Terminates and closes request.


Member Function Documentation

DNSRequestErr close (  )

Closes DNS Request before completion.

DNSRequestErr close (  )

Closes DNS Request before completion.

DNSRequestErr getResult ( IpAddr pIp )

Gets IP address once it has been resolved.

Parameters:
pIp: pointer to an IpAddr instance in which to store the resolved IP address
DNSRequestErr getResult ( IpAddr pIp )

Gets IP address once it has been resolved.

Parameters:
pIp: pointer to an IpAddr instance in which to store the resolved IP address
DNSRequestErr resolve ( const char *  hostname )

Resolves an hostname.

Parameters:
hostname: hostname to resolve
DNSRequestErr resolve ( const char *  hostname )

Resolves an hostname.

Parameters:
hostname: hostname to resolve
DNSRequestErr resolve ( Host pHost )

Resolves an hostname.

Parameters:
host: hostname to resolve, the result will be stored in the IpAddr field of this object
DNSRequestErr resolve ( Host pHost )

Resolves an hostname.

Parameters:
host: hostname to resolve, the result will be stored in the IpAddr field of this object
void setOnReply ( T *  pItem,
void(T::*)(DNSReply pMethod 
)

Setups callback.

The callback function will be called on result.

Parameters:
pItem: instance of class on which to execute the callback method
pMethod: callback method

Definition at line 102 of file LPC1768/api/DNSRequest.h.

void setOnReply ( void(*)(DNSReply pMethod )

Setups callback.

The callback function will be called on result.

Parameters:
pMethod: callback function
void setOnReply ( T *  pItem,
void(T::*)(DNSReply pMethod 
)

Setups callback.

The callback function will be called on result.

Parameters:
pItem: instance of class on which to execute the callback method
pMethod: callback method

Definition at line 102 of file LPC2368/api/DNSRequest.h.

void setOnReply ( void(*)(DNSReply pMethod )

Setups callback.

The callback function will be called on result.

Parameters:
pMethod: callback function