mirror of
https://github.com/defold/extension-websocket.git
synced 2025-09-30 09:12:18 +02:00
Run DNS lookup in a separate thread (#37)
* Moved connection pool dial to a thread * Make sure to join the thread when done * Cleanup in AppInitialize. Early exit if pool creation failed. * Only check connection timeout for emscripten
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include <dmsdk/dlib/dns.h>
|
||||
#include <dmsdk/dlib/uri.h>
|
||||
#include <dmsdk/dlib/array.h>
|
||||
#include <dmsdk/dlib/thread.h>
|
||||
|
||||
namespace dmCrypt
|
||||
{
|
||||
@@ -118,6 +119,7 @@ namespace dmWebsocket
|
||||
dmConnectionPool::HConnection m_Connection;
|
||||
dmSocket::Socket m_Socket;
|
||||
dmSSLSocket::Socket m_SSLSocket;
|
||||
dmThread::Thread m_ConnectionThread;
|
||||
dmArray<Message> m_Messages; // lengths of the messages in the data buffer
|
||||
uint64_t m_ConnectTimeout;
|
||||
uint8_t m_Key[16];
|
||||
|
Reference in New Issue
Block a user