QHttp2Configuration Class
QHttp2Configuration 클래스는 HTTP/2 매개변수와 설정을 제어합니다. 더 보기...
| 헤더: | #include <QHttp2Configuration> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Network) target_link_libraries(mytarget PRIVATE Qt6::Network) |
| qmake: | QT += network |
- 상속된 멤버를 포함한 모든 멤버 목록
- QHttp2Configuration은 네트워크 프로그래밍 API 및 암시적 공유 클래스의 일부입니다.
참고: 이 클래스의 모든 함수는 재진입 가능합니다.
공개 함수
| QHttp2Configuration() | |
| QHttp2Configuration(const QHttp2Configuration &other) | |
| QHttp2Configuration(QHttp2Configuration &&other) | |
| ~QHttp2Configuration() | |
| bool | huffmanCompressionEnabled() const |
(since 6.9) unsigned int | maxConcurrentStreams() const |
| unsigned int | maxFrameSize() const |
| bool | serverPushEnabled() const |
| unsigned int | sessionReceiveWindowSize() const |
| void | setHuffmanCompressionEnabled(bool enable) |
(since 6.9) void | setMaxConcurrentStreams(unsigned int value) |
| 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 & | operator=(QHttp2Configuration &&other) |
| QHttp2Configuration & | operator=(const QHttp2Configuration &other) |
관련 비멤버
| bool | operator!=(const QHttp2Configuration &lhs, const QHttp2Configuration &rhs) |
| bool | operator==(const QHttp2Configuration &lhs, const QHttp2Configuration &rhs) |
자세한 설명
QHttp2Configuration은 HTTP/2 프로토콜이 활성화된 경우 QNetworkAccessManager 가 요청을 전송하고 응답을 처리하는 데 사용할 HTTP/2 매개 변수 및 설정을 제어합니다.
QHttp2Configuration이 현재 지원하는 HTTP/2 매개 변수는 다음과 같습니다.
- 연결 수준 흐름 제어를 위한 세션 윈도우 크기입니다. 필요할 때 식별자 0을 가진 스트림의 'WINDOW_UPDATE' 프레임으로 원격 피어에게 전송됩니다.
- 스트림 수준 흐름 제어를 위한 스트림 수신 윈도우 크기입니다. 초기 SETTINGS 프레임에서 'SETTINGS_INITIAL_WINDOW_SIZE' 매개변수로 전송되며, 필요할 경우 QNetworkAccessManager 가 여는 스트림을 통해 'WINDOW_UPDATE' 프레임이 전송됩니다.
- 최대 프레임 크기입니다. 이 매개변수는 원격 피어에서 전송되는 프레임의 최대 페이로드 크기를 제한합니다. QNetworkAccessManager 가 초기 'SETTINGS' 프레임에서 'SETTINGS_MAX_FRAME_SIZE' 매개변수로 전송합니다.
- 서버 푸시. 서버 푸시를 활성화하거나 비활성화할 수 있습니다. 초기 'SETTINGS' 프레임에서 'SETTINGS_ENABLE_PUSH' 매개변수로 전송됩니다.
QHttp2Configuration 클래스는 또한 헤더 압축 알고리즘(HPACK)이 문자열 압축을 위해 허프만 코딩을 추가로 사용하는지 여부를 제어합니다.
참고: 구성은 특정 호스트로 첫 번째 요청이 전송되기 전(즉, HTTP/2 세션이 설정되기 전)에 설정되어야 합니다.
QNetworkRequest::setHttp2Configuration(), QNetworkRequest::http2Configuration() 및 QNetworkAccessManager도 참조하십시오 .
멤버 함수 문서
QHttp2Configuration::QHttp2Configuration()
Default는 QHttp2Configuration 객체를 생성합니다.
이러한 구성에는 다음과 같은 값이 포함됩니다:
- 서버 푸시가 비활성화되어 있습니다
- 허프만 문자열 압축이 활성화되어 있습니다
- 연결 수준 흐름 제어를 위한 윈도우 크기는 65535 옥텟입니다
- 스트림 수준 흐름 제어를 위한 윈도우 크기는 65535 옥텟입니다
- 프레임 크기는 16384 옥텟입니다
- 허용되는 최대 헤더 목록 크기는 262144 옥텟(256 KiB)입니다
QHttp2Configuration::QHttp2Configuration(const QHttp2Configuration &other)
이 QHttp2Configuration을 복사하여 생성합니다.
[noexcept] QHttp2Configuration::QHttp2Configuration(QHttp2Configuration &&other)
이 QHttp2Configuration을 다음에서 생성합니다. other
[noexcept] QHttp2Configuration::~QHttp2Configuration()
소멸자.
bool QHttp2Configuration::huffmanCompressionEnabled() const
HPACK에서 허프만 코딩이 활성화된 경우 true 를 반환합니다.
setHuffmanCompressionEnabled도 참조하십시오 .
[since 6.9] unsigned int QHttp2Configuration::maxConcurrentStreams() const
동시 스트림의 최대 개수를 반환합니다.
이 함수는 Qt 6.9에서 도입되었습니다.
setMaxConcurrentStreams()도 참조하십시오 .
unsigned int QHttp2Configuration::maxFrameSize() const
HTTP/2 프레임이 가질 수 있는 최대 페이로드 크기를 반환합니다. 기본(초기) 값은 16384 옥텟입니다.
setMaxFrameSize()도 참조하십시오 .
bool QHttp2Configuration::serverPushEnabled() const
서버 푸시가 활성화된 경우 true를 반환합니다.
참고: 기본적으로 QNetworkAccessManager 은 'SETTINGS' 프레임을 통해 서버 푸시를 비활성화합니다.
setServerPushEnabled도 참조하십시오 .
unsigned int QHttp2Configuration::sessionReceiveWindowSize() const
연결 수준 흐름 제어를 위한 윈도우 크기를 반환합니다. QNetworkAccessManager 가 사용하는 기본값은 2147483647 옥텟입니다.
setSessionReceiveWindowSize()도 참조하십시오 .
void QHttp2Configuration::setHuffmanCompressionEnabled(bool enable)
enable 가 true 인 경우, HPACK 압축은 허프만 코딩을 사용하여 문자열을 추가로 압축합니다. 기본적으로 활성화되어 있습니다.
참고: 이 매개변수는 QNetworkAccessManager 이 전송하는 'HEADERS' 프레임에만 영향을 미칩니다.
huffmanCompressionEnabled도 참조하십시오 .
[since 6.9] void QHttp2Configuration::setMaxConcurrentStreams(unsigned int value)
SETTINGS 프레임을 전송할 때 피어에게 알릴 동시 스트림의 최대 수를 value 로 설정합니다.
이 함수는 Qt 6.9에서 도입되었습니다.
maxConcurrentStreams()도 참조하십시오 .
bool QHttp2Configuration::setMaxFrameSize(unsigned int size)
QNetworkAccessManager 가 초기 SETTINGS 프레임을 전송할 때 서버에 알릴 최대 프레임 크기를 설정합니다.
참고: 이 size 값은 16384부터 16777215까지(양쪽 끝 포함)의 범위 내에 있어야하지만 , 페이로드를 전달하는 프레임의 실제 페이로드 크기는 16384보다 작을 수 있습니다.
성공 시 true 를 반환하고, 그렇지 않은 경우 false 를 반환합니다.
maxFrameSize()도 참조하십시오 .
void QHttp2Configuration::setServerPushEnabled(bool enable)
enable 가 true 인 경우, 원격 서버는 서버 푸시 기능을 사용하여 응답을 미리 보낼 수 있습니다.
serverPushEnabled도 참조하십시오 .
bool QHttp2Configuration::setSessionReceiveWindowSize(unsigned int size)
연결 수준 흐름 제어를 위한 창 크기를 설정합니다. ` size `는 0일 수 없으며, 2147483647 옥텟을 초과해서는 안 됩니다.
성공 시 true 를 반환하고, 그렇지 않은 경우 false 를 반환합니다.
sessionReceiveWindowSize도 참조하십시오 .
bool QHttp2Configuration::setStreamReceiveWindowSize(unsigned int size)
스트림 수준 흐름 제어를 위한 창 크기를 설정합니다. ` size `는 0일 수 없으며, 2147483647 옥텟을 초과해서는 안 됩니다.
성공 시 true 를 반환하고, 그렇지 않은 경우 false 를 반환합니다.
streamReceiveWindowSize도 참조하십시오 .
unsigned int QHttp2Configuration::streamReceiveWindowSize() const
스트림 수준 흐름 제어를 위한 윈도우 크기를 반환합니다. ` QNetworkAccessManager `에서 사용하는 기본값은 214748364 옥텟입니다( RFC 7540 참조).
setStreamReceiveWindowSize()도 참조하십시오 .
[noexcept] void QHttp2Configuration::swap(QHttp2Configuration &other)
이 구성을 other 로 교체합니다. 이 작업은 매우 빠르며 실패하는 일이 없습니다.
[noexcept] QHttp2Configuration &QHttp2Configuration::operator=(QHttp2Configuration &&other)
other 를 이 QHttp2Configuration 로 이동-할당합니다.
QHttp2Configuration &QHttp2Configuration::operator=(const QHttp2Configuration &other)
other 를 이 QHttp2Configuration 에 복사-할당합니다.
관련 비회원
[noexcept] bool operator!=(const QHttp2Configuration &lhs, const QHttp2Configuration &rhs)
lhs 와 rhs 의 HTTP/2 매개변수 집합이 일치하지 않을 경우, ` true `를 반환합니다.
[noexcept] bool operator==(const QHttp2Configuration &lhs, const QHttp2Configuration &rhs)
lhs 와 rhs 의 HTTP/2 매개변수 집합이 동일할 경우, ` true `를 반환합니다.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.