diff options
author | Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> | 2016-08-16 16:23:54 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> | 2016-08-19 16:26:36 +0000 |
commit | 4c27221295cbe61bb84adefaa58b1f27fc58a6bf (patch) | |
tree | bbf665d68336d6dd36aa592ffbdbd02eebf7dcf5 /src/network/access/qhttp2protocolhandler_p.h | |
parent | 691dc71a011a28743e4cdbd716c192b21d63b68b (diff) |
Refactor Http2::FrameReader/Http2::FrameWriter
Introduce new entity: class Http2::Frame with accessors like
payloadSize/type/flags/streamID etc. (they actually read
/interpret raw bytes from a frame's buffer) instead of
duplicating this functionality in reader/writer classes.
Delete defaulted members and remove explicitly defined
move ctors/operators (not needed actually).
Update auto-test ('HTTP/2 server') to use these new classes.
Change-Id: Ie3516efbd095704e212142eef9e792323678ccfa
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/network/access/qhttp2protocolhandler_p.h')
-rw-r--r-- | src/network/access/qhttp2protocolhandler_p.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/network/access/qhttp2protocolhandler_p.h b/src/network/access/qhttp2protocolhandler_p.h index 6804c329b9..92c6851078 100644 --- a/src/network/access/qhttp2protocolhandler_p.h +++ b/src/network/access/qhttp2protocolhandler_p.h @@ -124,7 +124,7 @@ private: bool acceptSetting(Http2::Settings identifier, quint32 newValue); void updateStream(Stream &stream, const HPack::HttpHeader &headers); - void updateStream(Stream &stream, const Http2::FrameReader &dataFrame); + void updateStream(Stream &stream, const Http2::Frame &dataFrame); void finishStream(Stream &stream); // Error code send by a peer (GOAWAY/RST_STREAM): void finishStreamWithError(Stream &stream, quint32 errorCode); @@ -161,12 +161,13 @@ private: // Peer's max frame size. quint32 maxFrameSize = Http2::maxFrameSize; - Http2::FrameReader inboundFrame; - Http2::FrameWriter outboundFrame; + Http2::FrameReader frameReader; + Http2::Frame inboundFrame; + Http2::FrameWriter frameWriter; // Temporary storage to assemble HEADERS' block // from several CONTINUATION frames ... bool continuationExpected = false; - std::vector<Http2::FrameReader> continuedFrames; + std::vector<Http2::Frame> continuedFrames; // Peer's max number of streams ... quint32 maxConcurrentStreams = Http2::maxConcurrentStreams; |