mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
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:
parent
28aa6a6954
commit
38946a0b06
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user