fix Websockets send with data > 65535 bytes (#460)

* json websockets: now sending of multiple frames as well es 64bit frame size works. code ideas taken from qtwebsockets

* remove debug stuff

* remove stl stuff
This commit is contained in:
redPanther
2017-08-06 21:50:30 +02:00
committed by GitHub
parent 569e59110e
commit f3bbe158bf
2 changed files with 112 additions and 36 deletions

View File

@@ -89,7 +89,7 @@ public:
~JsonClientConnection();
public slots:
void sendMessage(QJsonObject);
qint64 sendMessage(QJsonObject);
signals:
///
@@ -124,6 +124,12 @@ private:
///
void handleWebSocketFrame();
QByteArray getFrameHeader(quint8 opCode, quint64 payloadLength, bool lastFrame);
qint64 sendMessage_Raw(const char* data, quint64 size);
qint64 sendMessage_Raw(QByteArray data);
qint64 sendMessage_Websockets(QByteArray &data);
/// The TCP-Socket that is connected tot the Json-client
QTcpSocket * _socket;