diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-07 21:35:25 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-07 21:35:25 +0000 |
commit | f1ca6c6d71f3e31b333e0be45294bcb30fd89b4d (patch) | |
tree | 307b67ee46dc6b69b844626051c933711d1d1d0d /include/dns.h | |
parent | 8d948ff975c815cb32300354244b1bab263af155 (diff) |
DNS caching stuff (almost done)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6252 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/dns.h')
-rw-r--r-- | include/dns.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/dns.h b/include/dns.h index 83e4ab902..bfced4184 100644 --- a/include/dns.h +++ b/include/dns.h @@ -194,6 +194,16 @@ class Resolver : public Extensible * The core uses this to route results to the correct objects. */ int myid; + + /** + * Cached result, if there is one + */ + CachedQuery *CQ; + + /** + * Time left before cache expiry + */ + int time_left; public: /** * Initiate DNS lookup. Your class should not attempt to delete or free these @@ -238,7 +248,7 @@ class Resolver : public Extensible * When your lookup completes, this method will be called. * @param result The resulting DNS lookup, either an IP address or a hostname. */ - virtual void OnLookupComplete(const std::string &result, unsigned int ttl); + virtual void OnLookupComplete(const std::string &result, unsigned int ttl) = 0; /** * If an error occurs (such as NXDOMAIN, no domain name found) then this method * will be called. @@ -260,6 +270,8 @@ class Resolver : public Extensible * Returns the creator module, or NULL */ Module* GetCreator(); + + void TriggerCachedResult(); }; /** DNS is a singleton class used by the core to dispatch dns |