![]() |
Qt 6.x
The Qt SDK
|
The QHttp2Configuration class controls HTTP/2 parameters and settings. More...
#include <qhttp2configuration.h>
Public Member Functions | |
QHttp2Configuration () | |
Default constructs a QHttp2Configuration object. | |
QHttp2Configuration (const QHttp2Configuration &other) | |
Copy-constructs this QHttp2Configuration. | |
QHttp2Configuration (QHttp2Configuration &&other) noexcept | |
Move-constructs this QHttp2Configuration from other. | |
QHttp2Configuration & | operator= (const QHttp2Configuration &other) |
Copy-assigns other to this QHttp2Configuration. | |
QHttp2Configuration & | operator= (QHttp2Configuration &&other) noexcept |
Move-assigns other to this QHttp2Configuration. | |
~QHttp2Configuration () | |
Destructor. | |
void | setServerPushEnabled (bool enable) |
If enable is true , a remote server can potentially use server push to send responses in advance. | |
bool | serverPushEnabled () const |
Returns true if server push was enabled. | |
void | setHuffmanCompressionEnabled (bool enable) |
If enable is true , HPACK compression will additionally compress string using the Huffman coding. | |
bool | huffmanCompressionEnabled () const |
Returns true if the Huffman coding in HPACK is enabled. | |
bool | setSessionReceiveWindowSize (unsigned size) |
Sets the window size for connection-level flow control. | |
unsigned | sessionReceiveWindowSize () const |
Returns the window size for connection-level flow control. | |
bool | setStreamReceiveWindowSize (unsigned size) |
Sets the window size for stream-level flow control. | |
unsigned | streamReceiveWindowSize () const |
Returns the window size for stream-level flow control. | |
bool | setMaxFrameSize (unsigned size) |
Sets the maximum frame size that QNetworkAccessManager will advertise to the server when sending its initial SETTINGS frame. | |
unsigned | maxFrameSize () const |
Returns the maximum payload size that HTTP/2 frames can have. | |
void | swap (QHttp2Configuration &other) noexcept |
Swaps this configuration with the other configuration. | |
Friends | |
bool | operator== (const QHttp2Configuration &lhs, const QHttp2Configuration &rhs) noexcept |
Returns true if lhs and rhs have the same set of HTTP/2 parameters. | |
bool | operator!= (const QHttp2Configuration &lhs, const QHttp2Configuration &rhs) noexcept |
Returns true if lhs and rhs do not have the same set of HTTP/2 parameters. | |
The QHttp2Configuration class controls HTTP/2 parameters and settings.
\reentrant \inmodule QtNetwork
QHttp2Configuration controls HTTP/2 parameters and settings that QNetworkAccessManager will use to send requests and process responses when the HTTP/2 protocol is enabled.
The HTTP/2 parameters that QHttp2Configuration currently supports include:
\list
The QHttp2Configuration class also controls if the header compression algorithm (HPACK) is additionally using Huffman coding for string compression.
Definition at line 16 of file qhttp2configuration.h.
QHttp2Configuration::QHttp2Configuration | ( | ) |
Default constructs a QHttp2Configuration object.
Such a configuration has the following values: \list
Definition at line 86 of file qhttp2configuration.cpp.
|
default |
Copy-constructs this QHttp2Configuration.
|
noexcept |
Move-constructs this QHttp2Configuration from other.
Definition at line 99 of file qhttp2configuration.cpp.
References other(), and swap().
QHttp2Configuration::~QHttp2Configuration | ( | ) |
Destructor.
Definition at line 117 of file qhttp2configuration.cpp.
bool QHttp2Configuration::huffmanCompressionEnabled | ( | ) | const |
Returns true
if the Huffman coding in HPACK is enabled.
Definition at line 164 of file qhttp2configuration.cpp.
References QHttp2ConfigurationPrivate::huffmanCompressionEnabled.
unsigned QHttp2Configuration::maxFrameSize | ( | ) | const |
Returns the maximum payload size that HTTP/2 frames can have.
The default (initial) value is 16384 octets.
Definition at line 251 of file qhttp2configuration.cpp.
References QHttp2ConfigurationPrivate::maxFrameSize.
|
default |
Copy-assigns other to this QHttp2Configuration.
|
defaultnoexcept |
Move-assigns other to this QHttp2Configuration.
References swap().
bool QHttp2Configuration::serverPushEnabled | ( | ) | const |
Returns true if server push was enabled.
Definition at line 140 of file qhttp2configuration.cpp.
References QHttp2ConfigurationPrivate::pushEnabled.
unsigned QHttp2Configuration::sessionReceiveWindowSize | ( | ) | const |
Returns the window size for connection-level flow control.
The default value QNetworkAccessManager will be using is 2147483647 octets.
Definition at line 193 of file qhttp2configuration.cpp.
References QHttp2ConfigurationPrivate::sessionWindowSize.
void QHttp2Configuration::setHuffmanCompressionEnabled | ( | bool | enable | ) |
If enable is true
, HPACK compression will additionally compress string using the Huffman coding.
Enabled by default.
Definition at line 154 of file qhttp2configuration.cpp.
References QHttp2ConfigurationPrivate::huffmanCompressionEnabled.
bool QHttp2Configuration::setMaxFrameSize | ( | unsigned | size | ) |
Sets the maximum frame size that QNetworkAccessManager will advertise to the server when sending its initial SETTINGS frame.
Returns true
on success, false
otherwise.
Definition at line 236 of file qhttp2configuration.cpp.
References QHttp2ConfigurationPrivate::maxFrameSize, Http2::maxPayloadSize, and qCWarning.
void QHttp2Configuration::setServerPushEnabled | ( | bool | enable | ) |
If enable is true
, a remote server can potentially use server push to send responses in advance.
Definition at line 127 of file qhttp2configuration.cpp.
References QHttp2ConfigurationPrivate::pushEnabled.
bool QHttp2Configuration::setSessionReceiveWindowSize | ( | unsigned | size | ) |
Sets the window size for connection-level flow control.
size cannot be 0 and must not exceed 2147483647 octets.
Returns true
on success, false
otherwise.
Definition at line 177 of file qhttp2configuration.cpp.
References Http2::maxSessionReceiveWindowSize(), qCWarning, and QHttp2ConfigurationPrivate::sessionWindowSize.
bool QHttp2Configuration::setStreamReceiveWindowSize | ( | unsigned | size | ) |
Sets the window size for stream-level flow control.
size cannot be 0 and must not exceed 2147483647 octets.
Returns true
on success, false
otherwise.
Definition at line 206 of file qhttp2configuration.cpp.
References Http2::maxSessionReceiveWindowSize(), qCWarning, and QHttp2ConfigurationPrivate::streamWindowSize.
unsigned QHttp2Configuration::streamReceiveWindowSize | ( | ) | const |
Returns the window size for stream-level flow control.
The default value QNetworkAccessManager will be using is 214748364 octets (see \l {https://httpwg.org/specs/rfc7540.html#SettingValues}{RFC 7540}).
Definition at line 222 of file qhttp2configuration.cpp.
References QHttp2ConfigurationPrivate::streamWindowSize.
|
noexcept |
Swaps this configuration with the other configuration.
Definition at line 259 of file qhttp2configuration.cpp.
|
friend |
Returns true
if lhs and rhs do not have the same set of HTTP/2 parameters.
Definition at line 51 of file qhttp2configuration.h.
|
friend |
Returns true
if lhs and rhs have the same set of HTTP/2 parameters.
Definition at line 49 of file qhttp2configuration.h.