summaryrefslogtreecommitdiffstats
path: root/src/network/access/http2/http2frames_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/access/http2/http2frames_p.h')
-rw-r--r--src/network/access/http2/http2frames_p.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/network/access/http2/http2frames_p.h b/src/network/access/http2/http2frames_p.h
index 6abed315ca..c85be57a2e 100644
--- a/src/network/access/http2/http2frames_p.h
+++ b/src/network/access/http2/http2frames_p.h
@@ -101,13 +101,20 @@ private:
bool readHeader(QAbstractSocket &socket);
bool readPayload(QAbstractSocket &socket);
+ enum ReaderState {
+ Idle,
+ ReadingHeader,
+ ReadingPayload
+ };
+
+ ReaderState state = Idle;
+
// As soon as we got a header, we
// know payload size, offset is
// needed if we do not have enough
// data and will read the next chunk.
- bool incompleteRead = false;
quint32 offset = 0;
- std::vector<uchar> framePayload;
+ std::vector<uchar> frameBuffer;
};
class Q_AUTOTEST_EXPORT FrameWriter