]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/dns.h
Probably doesnt work yet
[user/henk/code/inspircd.git] / include / dns.h
index f1c1189095700c35c9f4cdfe23147b76f106d415..91e65577561fe6fc9035ca9d1966afe5ca3ba9ad 100644 (file)
@@ -78,10 +78,16 @@ public:
         * and returns true if the lookup was successfully initiated.
         */
        bool ForwardLookup(std::string host);
+       /** Used by modules to perform a dns lookup but have the socket engine poll a module, instead of the dns object directly.
+        */
+       bool ForwardLookupWithFD(std::string host, int &fd);
        /** This method will return true when the lookup is completed. It uses poll internally
         * to determine the status of the socket.
         */
        bool HasResult();
+       /** This method will return true if the lookup's fd matches the one provided
+        */
+       bool HasResult(int fd);
        /** This method returns the result of your query as a string, depending upon wether you
         * called DNS::ReverseLookup() or DNS::ForwardLookup.
         */
@@ -94,4 +100,11 @@ public:
        void SetNS(std::string dnsserver);
 };
 
+/** This is the handler function for multi-threaded DNS.
+ * It cannot be a class member as pthread will not let us
+ * create a thread whos handler function is a member of
+ * a class (ugh).
+ */
+void* dns_task(void* arg);
+
 #endif