mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
BoblightServer added
Former-commit-id: deb3479ee673d763ad2e5451fcd35a0febedb4f3
This commit is contained in:
@@ -42,7 +42,7 @@ void JsonClientConnection::readData()
|
||||
_receiveBuffer += _socket->readAll();
|
||||
|
||||
int bytes = _receiveBuffer.indexOf('\n') + 1;
|
||||
if (bytes != 0)
|
||||
while(bytes > 0)
|
||||
{
|
||||
// create message string
|
||||
std::string message(_receiveBuffer.data(), bytes);
|
||||
@@ -52,6 +52,9 @@ void JsonClientConnection::readData()
|
||||
|
||||
// handle message
|
||||
handleMessage(message);
|
||||
|
||||
// try too look up '\n' again
|
||||
bytes = _receiveBuffer.indexOf('\n') + 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user