BoblightServer added

Former-commit-id: deb3479ee673d763ad2e5451fcd35a0febedb4f3
This commit is contained in:
johan
2013-11-08 22:18:10 +01:00
parent 85c8ba0100
commit 7300413015
12 changed files with 528 additions and 2 deletions

View File

@@ -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;
}
}