summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/HostnameLookup.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-01-18 12:35:02 +0100
committerMattes D <github@xoft.cz>2015-01-22 20:13:02 +0100
commitd4682463a1d503c349ac95e275b11d67d402268c (patch)
treede3167d2b81eb909a419c1355021353e00e71074 /src/OSSupport/HostnameLookup.h
parentcNetwork: Split the main cpp file into several files. (diff)
downloadcuberite-d4682463a1d503c349ac95e275b11d67d402268c.tar
cuberite-d4682463a1d503c349ac95e275b11d67d402268c.tar.gz
cuberite-d4682463a1d503c349ac95e275b11d67d402268c.tar.bz2
cuberite-d4682463a1d503c349ac95e275b11d67d402268c.tar.lz
cuberite-d4682463a1d503c349ac95e275b11d67d402268c.tar.xz
cuberite-d4682463a1d503c349ac95e275b11d67d402268c.tar.zst
cuberite-d4682463a1d503c349ac95e275b11d67d402268c.zip
Diffstat (limited to 'src/OSSupport/HostnameLookup.h')
-rw-r--r--src/OSSupport/HostnameLookup.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/OSSupport/HostnameLookup.h b/src/OSSupport/HostnameLookup.h
index 98f48b933..d69f24707 100644
--- a/src/OSSupport/HostnameLookup.h
+++ b/src/OSSupport/HostnameLookup.h
@@ -21,6 +21,15 @@
/** Holds information about an in-progress Hostname-to-IP lookup. */
class cHostnameLookup
{
+public:
+ /** Creates the lookup object. Doesn't start the lookup yet. */
+ cHostnameLookup(cNetwork::cResolveNameCallbacksPtr a_Callbacks);
+
+ /** Starts the lookup. */
+ void Lookup(const AString & a_Hostname);
+
+protected:
+
/** The callbacks to call for resolved names / errors. */
cNetwork::cResolveNameCallbacksPtr m_Callbacks;
@@ -28,9 +37,6 @@ class cHostnameLookup
AString m_Hostname;
static void Callback(int a_ErrCode, struct evutil_addrinfo * a_Addr, void * a_Self);
-
-public:
- cHostnameLookup(const AString & a_Hostname, cNetwork::cResolveNameCallbacksPtr a_Callbacks);
};
typedef SharedPtr<cHostnameLookup> cHostnameLookupPtr;
typedef std::vector<cHostnameLookupPtr> cHostnameLookupPtrs;