Issue 13: Added support for connect sequence timeout

Decreased the select timeout when reading headers
Don't call callback with DISCONNECTED if the connection was never connected
This commit is contained in:
JCash
2020-10-17 11:40:53 +02:00
parent 9d1ace0a82
commit e105702c79
4 changed files with 43 additions and 8 deletions

View File

@@ -89,6 +89,7 @@ namespace dmWebsocket
dmSocket::Socket m_Socket;
dmSSLSocket::Socket m_SSLSocket;
dmArray<Message> m_Messages; // lengths of the messages in the data buffer
uint64_t m_ConnectTimeout;
uint8_t m_Key[16];
State m_State;
char* m_Buffer;
@@ -97,6 +98,7 @@ namespace dmWebsocket
Result m_Status;
uint8_t m_SSL:1;
uint8_t m_HasHandshakeData:1;
uint8_t m_WasConnected:1;
uint8_t :6;
};