summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/HostnameLookup.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/HostnameLookup.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/HostnameLookup.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/OSSupport/HostnameLookup.h b/src/OSSupport/HostnameLookup.h
index d69f24707..559dfad5f 100644
--- a/src/OSSupport/HostnameLookup.h
+++ b/src/OSSupport/HostnameLookup.h
@@ -12,7 +12,6 @@
#pragma once
#include "Network.h"
-#include <event2/util.h>
@@ -22,21 +21,21 @@
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);
+ /** Creates a lookup object and schedules the lookup. */
+ static void Lookup(const AString & a_Hostname, cNetwork::cResolveNameCallbacksPtr a_Callbacks);
protected:
+ /** Creates the lookup object. Doesn't start the lookup yet. */
+ cHostnameLookup(const AString & a_Hostname, cNetwork::cResolveNameCallbacksPtr a_Callbacks);
+
/** The callbacks to call for resolved names / errors. */
cNetwork::cResolveNameCallbacksPtr m_Callbacks;
/** The hostname that was queried (needed for the callbacks). */
AString m_Hostname;
- static void Callback(int a_ErrCode, struct evutil_addrinfo * a_Addr, void * a_Self);
+ void Callback(int a_ErrCode, struct addrinfo * a_Addr);
};
typedef SharedPtr<cHostnameLookup> cHostnameLookupPtr;
typedef std::vector<cHostnameLookupPtr> cHostnameLookupPtrs;