The QHttp2Configuration class controls HTTP/2 parameters and settings. More...
Header: | #include <QHttp2Configuration> |
qmake: | QT += network |
Since: | Qt 5.14 |
This class was introduced in Qt 5.14.
Note: All functions in this class are reentrant.
QHttp2Configuration(QHttp2Configuration &&other) | |
QHttp2Configuration(const QHttp2Configuration &other) | |
QHttp2Configuration() | |
QHttp2Configuration & | operator=(QHttp2Configuration &&other) |
QHttp2Configuration & | operator=(const QHttp2Configuration &other) |
~QHttp2Configuration() | |
bool | huffmanCompressionEnabled() const |
unsigned int | maxFrameSize() const |
bool | serverPushEnabled() const |
unsigned int | sessionReceiveWindowSize() const |
void | setHuffmanCompressionEnabled(bool enable) |
bool | setMaxFrameSize(unsigned int size) |
void | setServerPushEnabled(bool enable) |
bool | setSessionReceiveWindowSize(unsigned int size) |
bool | setStreamReceiveWindowSize(unsigned int size) |
unsigned int | streamReceiveWindowSize() const |
void | swap(QHttp2Configuration &other) |
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:
The QHttp2Configuration class also controls if the header compression algorithm (HPACK) is additionally using Huffman coding for string compression.
Note: The configuration must be set before the first request was sent to a given host (and thus an HTTP/2 session established).
Note: Details about flow control, server push and 'SETTINGS' can be found in RFC 7540. Different modes and parameters of the HPACK compression algorithm are described in RFC 7541.
See also QNetworkRequest::setHttp2Configuration(), QNetworkRequest::http2Configuration(), and QNetworkAccessManager.
Move-constructs this QHttp2Configuration from other
Copy-constructs this QHttp2Configuration.
Default constructs a QHttp2Configuration object.
Such a configuration has the following values:
Move-assigns to this QHttp2Configuration.
Copy-assigns to this QHttp2Configuration.
Destructor.
Returns true
if the Huffman coding in HPACK is enabled.
See also setHuffmanCompressionEnabled.
The maximum payload size that HTTP/2 frames can have. The default (initial) value is 16384 octets.
See also setMaxFrameSize().
Returns true if server push was enabled.
Note: By default, QNetworkAccessManager disables server push via the 'SETTINGS' frame.
See also setServerPushEnabled.
Returns the window size for connection-level flow control. The default value QNetworkAccessManager will be using is 2147483647 octets.
See also setSessionReceiveWindowSize().
If enable is true
, HPACK compression will additionally compress string using the Huffman coding. Enabled by default.
Note: This parameter only affects 'HEADERS' frames that QNetworkAccessManager is sending.
See also huffmanCompressionEnabled.
Sets the maximum frame size that QNetworkAccessManager will advertise to the server when sending its initial SETTINGS frame.
Note: While this size is required to be within a range between 16384 and 16777215 inclusive, the actual payload size in frames that carry payload maybe be less than 16384.
See also maxFrameSize().
If enable is true
, a remote server can potentially use server push to send reponses in advance.
See also serverPushEnabled.
Sets the window size for connection-level flow control. size cannot be 0 and must not exceed 2147483647 octets.
See also sessionReceiveWindowSize.
Sets the window size for stream-level flow control. size cannot be 0 and must not exceed 2147483647 octets.
See also streamReceiveWindowSize.
Returns the window size for stream-level flow control. The default value QNetworkAccessManager will be using is 21474836 octets.
See also setStreamReceiveWindowSize().
Swaps this configuration with the other configuration.
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-5.15/qhttp2configuration.html