InspIRCd  2.0
Public Member Functions | Public Attributes | List of all members
CachedQuery Class Reference

#include <dns.h>

Public Member Functions

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

Public Attributes

std::string data
QueryType type
time_t expires

Detailed Description

Cached item stored in the query cache.

Constructor & Destructor Documentation

◆ CachedQuery()

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

Build a cached query

resThe result data, an IP or hostname
qtThe type of DNS query this instance represents.
ttlThe time-to-live value of the query result

Member Function Documentation

◆ CalcTTLRemaining()

int CachedQuery::CalcTTLRemaining ( )

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

Member Data Documentation

◆ data

std::string CachedQuery::data

The cached result data, an IP or hostname

◆ expires

time_t CachedQuery::expires

The time when the item is due to expire

◆ type

QueryType CachedQuery::type

The type of result this is

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