You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the amount of data over 128K, slot "newMessage" can only receive most of the data. I found the last part of the data is in priv->payload, so I modified the code.
websocket.cpp
if (priv->frame.fin()) {
// FINALif (priv->frame.isControlFrame()) {
evaluateControlFrame();
} else {
if (priv->frame.opcode() == FrameType::CONTINUATION) {
// CONTINUATION
QByteArray chunk(priv->fragment);
chunk.append(priv->payload); // add this line, the last part of data
priv->fragment.clear();
priv->payload.clear(); // also clear
emit newMessage(chunk);
} else {
// NON-CONTINUATION
QByteArray chunk(priv->payload);
priv->payload.clear();
emit newMessage(chunk);
}
}
}
It seems that everything is ok
Please help to check whether this modification is feasible,thanks
The text was updated successfully, but these errors were encountered:
version:1.4.5
protocol :websocket
When the amount of data over 128K, slot "newMessage" can only receive most of the data. I found the last part of the data is in priv->payload, so I modified the code.
websocket.cpp
It seems that everything is ok
Please help to check whether this modification is feasible,thanks
The text was updated successfully, but these errors were encountered: