This repository was archived by the owner on May 6, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +2
-20
lines changed Expand file tree Collapse file tree 1 file changed +2
-20
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ void JsonClientConnection::readData()
6565 break ;
6666 case 127 : {
6767 payloadLength = 0 ;
68- for (int i=0 ; i < 8 ; i++) {
68+ for (uint i=0 ; i < 8 ; i++) {
6969 payloadLength |= ((quint64)(_receiveBuffer.at (index+i) & 0xFF )) << (8 *(7 -i));
7070 }
7171 index += 8 ;
@@ -76,7 +76,7 @@ void JsonClientConnection::readData()
7676 }
7777
7878 if (isMasked) { // if the data is masked we need to get the key for unmasking
79- for (int i=0 ; i < 4 ; i++) {
79+ for (uint i=0 ; i < 4 ; i++) {
8080 maskKey[i] = _receiveBuffer.at (index + i);
8181 }
8282 index += 4 ;
@@ -162,24 +162,6 @@ void JsonClientConnection::readData()
162162 }
163163 }
164164 }
165-
166- /*
167- int bytes = _receiveBuffer.indexOf('\n') + 1;
168- while(bytes > 0)
169- {
170- // create message string
171- std::string message(_receiveBuffer.data(), bytes);
172-
173- // remove message data from buffer
174- _receiveBuffer = _receiveBuffer.mid(bytes);
175-
176- // handle message
177- handleMessage(message);
178-
179- // try too look up '\n' again
180- bytes = _receiveBuffer.indexOf('\n') + 1;
181- }
182- */
183165}
184166
185167void JsonClientConnection::socketClosed ()
You can’t perform that action at this time.
0 commit comments