Temporary solution

Due to the wrong interpretation of the OpCode, larger WebSocket frames are interpreted as a binary message. A new implementation of the WebSocket protocol in Hyperion is necessary. The QT class QWebSocketServer does not have this problem. However, this can not be mixed with an existing QTcpServer implementation without using a new WebSocket port.
This commit is contained in:
Paulchen Panther 2019-01-13 20:14:05 +01:00 committed by GitHub
parent 28aa6a6954
commit 38946a0b06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -115,14 +115,14 @@ void WebSocketClient::handleWebSocketFrame(void)
if (_wsh.fin)
{
_onContinuation = false;
if (_wsh.opCode == OPCODE::TEXT)
{
// if (_wsh.opCode == OPCODE::TEXT)
// {
_jsonAPI->handleMessage(QString(_wsReceiveBuffer));
}
else
{
handleBinaryMessage(_wsReceiveBuffer);
}
// }
// else
// {
// handleBinaryMessage(_wsReceiveBuffer);
// }
_wsReceiveBuffer.clear();
}
}