Qt 6.x
The Qt SDK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
http2streams.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include "http2streams_p.h"
5
6#include "private/qhttp2protocolhandler_p.h"
7#include "private/qhttpnetworkreply_p.h"
8
9#include <QtCore/qdebug.h>
10
12
13namespace Http2
14{
15
17{
18}
19
21 : httpPair(message),
22 streamID(id),
23 sendWindow(sendSize),
24 recvWindow(recvSize)
25{
26}
27
28Stream::Stream(const QString &cacheKey, quint32 id, qint32 recvSize)
29 : streamID(id),
30 // sendWindow is 0, this stream only receives data
31 recvWindow(recvSize),
32 state(remoteReserved),
33 key(cacheKey)
34{
35}
36
38{
39 return httpPair.second;
40}
41
43{
44 return httpPair.first;
45}
46
48{
49 return httpPair.first;
50}
51
53{
54 return httpPair.first.priority();
55}
56
58{
59 switch (priority()) {
61 return 0;
63 return 127;
65 default:
66 return 255;
67 }
68}
69
71{
72 return httpPair.first.uploadByteDevice();
73}
74
75} // namespace Http2
76
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
else opt state
[0]
Combined button and popup list for selecting options.
QPair< QHttpNetworkRequest, QHttpNetworkReply * > HttpMessagePair
GLuint64 key
GLenum GLuint id
[7]
GLuint GLsizei const GLchar * message
unsigned int quint32
Definition qtypes.h:45
unsigned char uchar
Definition qtypes.h:27
int qint32
Definition qtypes.h:44
QNonContiguousByteDevice * data() const
QHttpNetworkReply * reply() const
HttpMessagePair httpPair
const QHttpNetworkRequest & request() const
uchar weight() const
QHttpNetworkRequest::Priority priority() const