QtBase  v6.3.1
Classes | Enumerations | Functions | Variables
Http2 Namespace Reference

Classes

struct  Frame
 
class  FrameReader
 
class  FrameWriter
 
struct  Stream
 
struct  PushPromise
 

Enumerations

enum class  Settings : quint16 {
  HEADER_TABLE_SIZE_ID = 0x1 , ENABLE_PUSH_ID = 0x2 , MAX_CONCURRENT_STREAMS_ID = 0x3 , INITIAL_WINDOW_SIZE_ID = 0x4 ,
  MAX_FRAME_SIZE_ID = 0x5 , MAX_HEADER_LIST_SIZE_ID = 0x6
}
 
enum class  FrameType : uchar {
  DATA = 0x0 , HEADERS = 0x1 , PRIORITY = 0x2 , RST_STREAM = 0x3 ,
  SETTINGS = 0x4 , PUSH_PROMISE = 0x5 , PING = 0x6 , GOAWAY = 0x7 ,
  WINDOW_UPDATE = 0x8 , CONTINUATION = 0x9 , LAST_FRAME_TYPE
}
 
enum class  FrameFlag : uchar {
  EMPTY = 0x0 , ACK = 0x1 , END_STREAM = 0x1 , END_HEADERS = 0x4 ,
  PADDED = 0x8 , PRIORITY = 0x20
}
 
enum  Http2PredefinedParameters {
  clientPrefaceLength = 24 , connectionStreamID = 0 , frameHeaderSize = 9 , minPayloadLimit = 16384 ,
  maxPayloadSize = (1 << 24) - 1 , defaultSessionWindowSize = 65535 , maxConcurrentStreams = 100
}
 
enum class  FrameStatus { protocolError , sizeError , incompleteFrame , goodFrame }
 
enum  Http2Error {
  HTTP2_NO_ERROR = 0x0 , PROTOCOL_ERROR = 0x1 , INTERNAL_ERROR = 0x2 , FLOW_CONTROL_ERROR = 0x3 ,
  SETTINGS_TIMEOUT = 0x4 , STREAM_CLOSED = 0x5 , FRAME_SIZE_ERROR = 0x6 , REFUSE_STREAM = 0x7 ,
  CANCEL = 0x8 , COMPRESSION_ERROR = 0x9 , CONNECT_ERROR = 0xa , ENHANCE_YOUR_CALM = 0xb ,
  INADEQUATE_SECURITY = 0xc , HTTP_1_1_REQUIRED = 0xd
}
 

Functions

Frame configurationToSettingsFrame (const QHttp2Configuration &config)
 
QByteArray settingsFrameToBase64 (const Frame &frame)
 
void appendProtocolUpgradeHeaders (const QHttp2Configuration &config, QHttpNetworkRequest *request)
 
void qt_error (quint32 errorCode, QNetworkReply::NetworkError &error, QString &errorMessage)
 
QString qt_error_string (quint32 errorCode)
 
QNetworkReply::NetworkError qt_error (quint32 errorCode)
 
bool is_protocol_upgraded (const QHttpNetworkReply &reply)
 
const quint32 lastValidStreamID ((quint32(1)<< 31) - 1)
 
const qint32 maxSessionReceiveWindowSize ((quint32(1)<< 31) - 1)
 

Variables

const char Http2clientPreface [clientPrefaceLength]
 
const qint32 qtDefaultStreamReceiveWindowSize = maxSessionReceiveWindowSize / maxConcurrentStreams
 

Enumeration Type Documentation

◆ FrameFlag

enum Http2::FrameFlag : uchar
strong
Enumerator
EMPTY 
ACK 
END_STREAM 
END_HEADERS 
PADDED 
PRIORITY 

Definition at line 102 of file http2protocol_p.h.

◆ FrameStatus

enum Http2::FrameStatus
strong
Enumerator
protocolError 
sizeError 
incompleteFrame 
goodFrame 

Definition at line 159 of file http2protocol_p.h.

◆ FrameType

enum Http2::FrameType : uchar
strong
Enumerator
DATA 
HEADERS 
PRIORITY 
RST_STREAM 
SETTINGS 
PUSH_PROMISE 
PING 
GOAWAY 
WINDOW_UPDATE 
CONTINUATION 
LAST_FRAME_TYPE 

Definition at line 83 of file http2protocol_p.h.

◆ Http2Error

Enumerator
HTTP2_NO_ERROR 
PROTOCOL_ERROR 
INTERNAL_ERROR 
FLOW_CONTROL_ERROR 
SETTINGS_TIMEOUT 
STREAM_CLOSED 
FRAME_SIZE_ERROR 
REFUSE_STREAM 
CANCEL 
COMPRESSION_ERROR 
CONNECT_ERROR 
ENHANCE_YOUR_CALM 
INADEQUATE_SECURITY 
HTTP_1_1_REQUIRED 

Definition at line 167 of file http2protocol_p.h.

◆ Http2PredefinedParameters

Enumerator
clientPrefaceLength 
connectionStreamID 
frameHeaderSize 
minPayloadLimit 
maxPayloadSize 
defaultSessionWindowSize 
maxConcurrentStreams 

Definition at line 115 of file http2protocol_p.h.

◆ Settings

enum Http2::Settings : quint16
strong
Enumerator
HEADER_TABLE_SIZE_ID 
ENABLE_PUSH_ID 
MAX_CONCURRENT_STREAMS_ID 
INITIAL_WINDOW_SIZE_ID 
MAX_FRAME_SIZE_ID 
MAX_HEADER_LIST_SIZE_ID 

Definition at line 73 of file http2protocol_p.h.

Function Documentation

◆ appendProtocolUpgradeHeaders()

void Http2::appendProtocolUpgradeHeaders ( const QHttp2Configuration config,
QHttpNetworkRequest request 
)

Definition at line 108 of file http2protocol.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ configurationToSettingsFrame()

struct Frame Http2::configurationToSettingsFrame ( const QHttp2Configuration config)

Definition at line 69 of file http2protocol.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_protocol_upgraded()

bool Http2::is_protocol_upgraded ( const QHttpNetworkReply reply)

Definition at line 221 of file http2protocol.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lastValidStreamID()

const quint32 Http2::lastValidStreamID ( (quint32(1)<< 31) -  1)

◆ maxSessionReceiveWindowSize()

const qint32 Http2::maxSessionReceiveWindowSize ( (quint32(1)<< 31) -  1)
Here is the caller graph for this function:

◆ qt_error() [1/2]

QNetworkReply::NetworkError Http2::qt_error ( quint32  errorCode)

Definition at line 213 of file http2protocol.cpp.

Here is the caller graph for this function:

◆ qt_error() [2/2]

void Http2::qt_error ( quint32  errorCode,
QNetworkReply::NetworkError error,
QString errorMessage 
)

Definition at line 128 of file http2protocol.cpp.

◆ qt_error_string()

QString Http2::qt_error_string ( quint32  errorCode)

Definition at line 205 of file http2protocol.cpp.

Here is the call graph for this function:

◆ settingsFrameToBase64()

QByteArray Http2::settingsFrameToBase64 ( const Frame frame)

Definition at line 93 of file http2protocol.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ Http2clientPreface

const Q_AUTOTEST_EXPORT char Http2::Http2clientPreface
Initial value:
=
{0x50, 0x52, 0x49, 0x20, 0x2a, 0x20,
0x48, 0x54, 0x54, 0x50, 0x2f, 0x32,
0x2e, 0x30, 0x0d, 0x0a, 0x0d, 0x0a,
0x53, 0x4d, 0x0d, 0x0a, 0x0d, 0x0a}

Definition at line 63 of file http2protocol.cpp.

◆ qtDefaultStreamReceiveWindowSize

const qint32 Http2::qtDefaultStreamReceiveWindowSize = maxSessionReceiveWindowSize / maxConcurrentStreams

Definition at line 151 of file http2protocol_p.h.