non blocking dns lookup

This commit is contained in:
Benjamin Sergeant
2018-12-14 16:28:11 -08:00
parent 8c079787f0
commit cbadecab33
17 changed files with 323 additions and 52 deletions

View File

@ -136,6 +136,9 @@ namespace ix
WebSocketPerMessageDeflateOptions _perMessageDeflateOptions;
std::atomic<bool> _enablePerMessageDeflate;
// Used to cancel dns lookup + socket connect + http upgrade
std::atomic<bool> _requestInitCancellation;
void sendOnSocket();
WebSocketSendInfo sendData(wsheader_type::opcode_type type,
const std::string& message,
@ -158,6 +161,8 @@ namespace ix
void unmaskReceiveBuffer(const wsheader_type& ws);
std::string genRandomString(const int len);
// Non blocking versions of read/write, used during http upgrade
bool readByte(void* buffer);
bool writeBytes(const std::string& str);
};
}