summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttp2protocolhandler_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/access/qhttp2protocolhandler_p.h')
-rw-r--r--src/network/access/qhttp2protocolhandler_p.h42
1 files changed, 28 insertions, 14 deletions
diff --git a/src/network/access/qhttp2protocolhandler_p.h b/src/network/access/qhttp2protocolhandler_p.h
index 5e04c79376..dd209bd0ef 100644
--- a/src/network/access/qhttp2protocolhandler_p.h
+++ b/src/network/access/qhttp2protocolhandler_p.h
@@ -98,7 +98,7 @@ private:
using Stream = Http2::Stream;
void _q_readyRead() override;
- void _q_receiveReply() override;
+ Q_INVOKABLE void _q_receiveReply() override;
Q_INVOKABLE bool sendRequest() override;
bool sendClientPreface();
@@ -136,7 +136,7 @@ private:
const QString &message);
// Stream's lifecycle management:
- quint32 createNewStream(const HttpMessagePair &message);
+ quint32 createNewStream(const HttpMessagePair &message, bool uploadDone = false);
void addToSuspended(Stream &stream);
void markAsReset(quint32 streamID);
quint32 popStreamToResume();
@@ -172,24 +172,38 @@ private:
bool continuationExpected = false;
std::vector<Http2::Frame> continuedFrames;
- // Peer's max number of streams ...
- quint32 maxConcurrentStreams = Http2::maxConcurrentStreams;
-
// Control flow:
- static const qint32 sessionMaxRecvWindowSize = Http2::defaultSessionWindowSize * 10;
- // Signed integer, it can become negative (it's still a valid window size):
- qint32 sessionRecvWindowSize = sessionMaxRecvWindowSize;
- // We do not negotiate this window size
- // We have to send WINDOW_UPDATE frames to our peer also.
- static const qint32 streamInitialRecvWindowSize = Http2::defaultSessionWindowSize;
-
- // Updated by SETTINGS and WINDOW_UPDATE.
+ // This is how many concurrent streams our peer expects from us:
+ // 100 is the default value, can be updated by the server's SETTINGS
+ // frame(s):
+ quint32 maxConcurrentStreams = Http2::maxConcurrentStreams;
+ // While we allow sending SETTTINGS_MAX_CONCURRENT_STREAMS to limit our peer,
+ // it's just a hint and we do not actually enforce it (and we can continue
+ // sending requests and creating streams while maxConcurrentStreams allows).
+
+ // This is the max value, we set it in a ctor from Http2::ProtocolParameters,
+ // it does not change after that.
+ qint32 maxSessionReceiveWindowSize = Http2::defaultSessionWindowSize;
+
+ // Our session receive window size, default is 64Kb. We'll update it from QNAM's
+ // Http2::ProtocolParameters. Signed integer since it can become negative
+ // (it's still a valid window size).
+ qint32 sessionReceiveWindowSize = Http2::defaultSessionWindowSize;
+ // Our per-stream receive window size, default is 64 Kb, will be updated
+ // from QNAM's Http2::ProtocolParameters. Again, signed - can become negative.
+ qint32 streamInitialReceiveWindowSize = Http2::defaultSessionWindowSize;
+
+ // These are our peer's receive window sizes, they will be updated by the
+ // peer's SETTINGS and WINDOW_UPDATE frames.
qint32 sessionSendWindowSize = Http2::defaultSessionWindowSize;
qint32 streamInitialSendWindowSize = Http2::defaultSessionWindowSize;
- // It's unlimited by default, but can be changed via SETTINGS.
+ // Our peer's header size limitations. It's unlimited by default, but can
+ // be changed via peer's SETTINGS frame.
quint32 maxHeaderListSize = (std::numeric_limits<quint32>::max)();
+ // While we can send SETTINGS_MAX_HEADER_LIST_SIZE value (our limit on
+ // the headers size), we never enforce it, it's just a hint to our peer.
Q_INVOKABLE void resumeSuspendedStreams();
// Our stream IDs (all odd), the first valid will be 1.