summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/IPLookup.h
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2017-06-15 11:03:49 +0200
committerLukas Pioch <lukas@zgow.de>2017-06-15 11:03:49 +0200
commit035ecdc9e285ad2fd9ccf51e4ed2ac01b53dc3d1 (patch)
treeb6caede9a35093d3e59c57c8c8c7295dc1c8fbaf /src/OSSupport/IPLookup.h
parentAdded missing 1.12 packet changes (diff)
downloadcuberite-035ecdc9e285ad2fd9ccf51e4ed2ac01b53dc3d1.tar
cuberite-035ecdc9e285ad2fd9ccf51e4ed2ac01b53dc3d1.tar.gz
cuberite-035ecdc9e285ad2fd9ccf51e4ed2ac01b53dc3d1.tar.bz2
cuberite-035ecdc9e285ad2fd9ccf51e4ed2ac01b53dc3d1.tar.lz
cuberite-035ecdc9e285ad2fd9ccf51e4ed2ac01b53dc3d1.tar.xz
cuberite-035ecdc9e285ad2fd9ccf51e4ed2ac01b53dc3d1.tar.zst
cuberite-035ecdc9e285ad2fd9ccf51e4ed2ac01b53dc3d1.zip
Diffstat (limited to '')
-rw-r--r--src/OSSupport/IPLookup.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/OSSupport/IPLookup.h b/src/OSSupport/IPLookup.h
index af878cbf1..600ce0af2 100644
--- a/src/OSSupport/IPLookup.h
+++ b/src/OSSupport/IPLookup.h
@@ -21,12 +21,9 @@
class cIPLookup
{
public:
- /** Creates the lookup object. Doesn't start the lookup yet. */
- cIPLookup(cNetwork::cResolveNameCallbacksPtr a_Callbacks);
- /** Starts the lookup.
- Returns true if lookup started successfully, false on failure (invalid IP format etc.) */
- bool Lookup(const AString & a_IP);
+ /** Creates a lookup object and schedules the lookup. */
+ static void Lookup(const AString & a_IP, cNetwork::cResolveNameCallbacksPtr a_Callbacks);
protected:
@@ -36,9 +33,11 @@ protected:
/** The IP that was queried (needed for the callbacks). */
AString m_IP;
+ /** Creates the lookup object. Doesn't start the lookup yet. */
+ cIPLookup(const AString & a_IP, cNetwork::cResolveNameCallbacksPtr a_Callbacks);
/** Callback that is called by LibEvent when there's an event for the request. */
- static void Callback(int a_Result, char a_Type, int a_Count, int a_Ttl, void * a_Addresses, void * a_Self);
+ void Callback(int a_Result, const char * a_Address);
};
typedef SharedPtr<cIPLookup> cIPLookupPtr;
typedef std::vector<cIPLookupPtr> cIPLookupPtrs;