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()
65
65
break ;
66
66
case 127 : {
67
67
payloadLength = 0 ;
68
- for (int i=0 ; i < 8 ; i++) {
68
+ for (uint i=0 ; i < 8 ; i++) {
69
69
payloadLength |= ((quint64)(_receiveBuffer.at (index+i) & 0xFF )) << (8 *(7 -i));
70
70
}
71
71
index += 8 ;
@@ -76,7 +76,7 @@ void JsonClientConnection::readData()
76
76
}
77
77
78
78
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++) {
80
80
maskKey[i] = _receiveBuffer.at (index + i);
81
81
}
82
82
index += 4 ;
@@ -162,24 +162,6 @@ void JsonClientConnection::readData()
162
162
}
163
163
}
164
164
}
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
- */
183
165
}
184
166
185
167
void JsonClientConnection::socketClosed ()
You can’t perform that action at this time.
0 commit comments