diff options
author | Mattes D <github@xoft.cz> | 2015-01-18 11:57:16 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-01-22 20:13:02 +0100 |
commit | c0cb787c101725a649d26de68fca2632c82830ba (patch) | |
tree | c5efafa98e7ccfa628f5873e5611b49ff0b44d21 /src/OSSupport/IPLookup.h | |
parent | cNetwork: Fixed WinXP dualstack listening. (diff) | |
download | cuberite-c0cb787c101725a649d26de68fca2632c82830ba.tar cuberite-c0cb787c101725a649d26de68fca2632c82830ba.tar.gz cuberite-c0cb787c101725a649d26de68fca2632c82830ba.tar.bz2 cuberite-c0cb787c101725a649d26de68fca2632c82830ba.tar.lz cuberite-c0cb787c101725a649d26de68fca2632c82830ba.tar.xz cuberite-c0cb787c101725a649d26de68fca2632c82830ba.tar.zst cuberite-c0cb787c101725a649d26de68fca2632c82830ba.zip |
Diffstat (limited to 'src/OSSupport/IPLookup.h')
-rw-r--r-- | src/OSSupport/IPLookup.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/OSSupport/IPLookup.h b/src/OSSupport/IPLookup.h new file mode 100644 index 000000000..f39b955aa --- /dev/null +++ b/src/OSSupport/IPLookup.h @@ -0,0 +1,40 @@ + +// IPLookup.h + +// Declares the cIPLookup class representing an IP-to-hostname lookup in progress. + +// This is an internal header, no-one outside OSSupport should need to include it; use Network.h instead + + + + + +#pragma once + +#include "Network.h" + + + + + +/** Holds information about an in-progress IP-to-Hostname lookup. */ +class cIPLookup +{ + /** The callbacks to call for resolved names / errors. */ + cNetwork::cResolveNameCallbacksPtr m_Callbacks; + + /** The IP that was queried (needed for the callbacks). */ + AString m_IP; + + static void Callback(int a_Result, char a_Type, int a_Count, int a_Ttl, void * a_Addresses, void * a_Self); + +public: + cIPLookup(const AString & a_IP, cNetwork::cResolveNameCallbacksPtr a_Callbacks); +}; +typedef SharedPtr<cIPLookup> cIPLookupPtr; +typedef std::vector<cIPLookupPtr> cIPLookupPtrs; + + + + + |