#include <DNSNameCache.h>
 | 
| void  | Add (const std::string &strHostName, const std::string &strIpAddress) | 
|   | Add the IP for a hostname to the cache. From the time of adding it stays in the cache for TTL.  
  | 
|   | 
| void  | AddPermanent (const std::string &strHostName, const std::string &strIpAddress) | 
|   | Add the IP for a hostname to the cache indefinitely.  
  | 
|   | 
| bool  | GetCached (const std::string &strHostName, std::string &strIpAddress) const | 
|   | Get an IP for a hostname from the cache.  
  | 
|   | 
| bool  | Lookup (const std::string &strHostName, std::string &strIpAddress) | 
|   | Get the IP for the hostname from the cache or query it form the DNS.  
  | 
|   | 
◆ Add()
      
        
          | void CDNSNameCache::Add  | 
          ( | 
          const std::string & |           strHostName,  | 
        
        
           | 
           | 
          const std::string & |           strIpAddress ) | 
        
      
 
Add the IP for a hostname to the cache. From the time of adding it stays in the cache for TTL. 
- Parameters
 - 
  
    | strHostName | The hostname  | 
    | strIpAddress | The IP for that hostname. Can be IPv4 or IPv6  | 
  
   
 
 
◆ AddPermanent()
      
        
          | void CDNSNameCache::AddPermanent  | 
          ( | 
          const std::string & |           strHostName,  | 
        
        
           | 
           | 
          const std::string & |           strIpAddress ) | 
        
      
 
Add the IP for a hostname to the cache indefinitely. 
- Parameters
 - 
  
    | strHostName | The hostname  | 
    | strIpAddress | The IP for that hostname. Can be IPv4 or IPv6  | 
  
   
 
 
◆ GetCached()
      
        
          | bool CDNSNameCache::GetCached  | 
          ( | 
          const std::string & |           strHostName,  | 
        
        
           | 
           | 
          std::string & |           strIpAddress ) const | 
        
      
 
Get an IP for a hostname from the cache. 
- Parameters
 - 
  
     | strHostName | The hostname to look up  | 
    | [out] | strIpAddress | Contains the IP for the hostname if the info is in the cache, otherwise unchanged | 
  
   
- Returns
 - true if the IP is cached 
 
 
 
◆ Lookup()
      
        
          | bool CDNSNameCache::Lookup  | 
          ( | 
          const std::string & |           strHostName,  | 
        
        
           | 
           | 
          std::string & |           strIpAddress ) | 
        
      
 
Get the IP for the hostname from the cache or query it form the DNS. 
If a successful DNS query was performed the result is added to the cache for the duration of TTL
- Parameters
 - 
  
     | strHostName | The hostname to look up  | 
    | [out] | strIpAddress | Contains the IP for the hostname if the info can be provided, otherwise unchanged | 
  
   
- Returns
 - true if the IP is cached or the DNS query was successful 
 
 
 
The documentation for this class was generated from the following files: