InspIRCd  2.0
 All Classes Namespaces Functions Variables Typedefs Enumerations
Public Member Functions | Public Attributes | List of all members
CachedQuery Class Reference

#include <dns.h>

Public Member Functions

 CachedQuery (const std::string &res, unsigned int ttl)
int CalcTTLRemaining ()

Public Attributes

std::string data
time_t expires

Detailed Description

Cached item stored in the query cache.

Constructor & Destructor Documentation

CachedQuery::CachedQuery ( const std::string &  res,
unsigned int  ttl 

Build a cached query

resThe result data, an IP or hostname
ttlThe time-to-live value of the query result

Member Function Documentation

int CachedQuery::CalcTTLRemaining ( )

Returns the number of seconds remaining before this cache item has expired and should be removed.

Member Data Documentation

std::string CachedQuery::data

The cached result data, an IP or hostname

time_t CachedQuery::expires

The time when the item is due to expire

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