summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/NetworkSingleton.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/OSSupport/NetworkSingleton.h')
-rw-r--r--src/OSSupport/NetworkSingleton.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/OSSupport/NetworkSingleton.h b/src/OSSupport/NetworkSingleton.h
index 2a2d0cef3..31347f4c1 100644
--- a/src/OSSupport/NetworkSingleton.h
+++ b/src/OSSupport/NetworkSingleton.h
@@ -14,6 +14,8 @@
#pragma once
#include <event2/event.h>
+#include <asio/ip/tcp.hpp>
+#include <asio/io_context.hpp>
#include "NetworkLookup.h"
#include "CriticalSection.h"
#include "Event.h"
@@ -57,7 +59,7 @@ public:
event_base * GetEventBase(void) { return m_EventBase; }
/** Returns the thread used to perform hostname and IP lookups */
- cNetworkLookup & GetLookupThread() { return m_LookupThread; }
+ asio::ip::tcp::resolver & GetLookupThread() { return m_Resolver; }
/** Adds the specified link to m_Connections.
Used by the underlying link implementation when a new link is created. */
@@ -100,7 +102,11 @@ protected:
cEvent m_StartupEvent;
/** The thread on which hostname and ip address lookup is performed. */
- cNetworkLookup m_LookupThread;
+ std::thread m_LookupThread;
+
+ asio::io_context m_Context;
+
+ asio::ip::tcp::resolver m_Resolver;
/** Converts LibEvent-generated log events into log messages in MCS log. */