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 |
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 & | 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' 프레임으로 원격 피어로 전송됩니다.
- 스트림 수준 흐름 제어를 위한 스트림 수신 창 크기입니다. 초기 설정 프레임에서 '설정_초기_창 크기' 파라미터로 전송되며, 필요한 경우 QNetworkAccessManager 이 열리는 스트림에서 'WINDOW_UPDATE' 프레임이 전송됩니다.
- 최대 프레임 크기. 이 파라미터는 원격 피어에서 오는 프레임이 가질 수 있는 최대 페이로드를 제한합니다. QNetworkAccessManager 에서 초기 '설정' 프레임의 '설정_최대_프레임_크기' 파라미터로 전송합니다.
- 서버 푸시. 서버 푸시를 활성화 또는 비활성화할 수 있습니다. 초기 '설정' 프레임에서 '설정_enable_push' 파라미터로 전송됩니다.
QHttp2Configuration 클래스는 헤더 압축 알고리즘(HPACK)이 문자열 압축을 위해 허프만 코딩을 추가로 사용할지 여부도 제어합니다.
참고: 이 구성은 지정된 호스트에 첫 번째 요청이 전송되기 전에(따라서 HTTP/2 세션이 설정되기 전에) 설정되어야 합니다.
참고: 흐름 제어, 서버 푸시 및 '설정'에 대한 자세한 내용은 RFC 7540에서 확인할 수 있습니다. HPACK 압축 알고리즘의 다양한 모드와 파라미터는 RFC 7541에 설명되어 있습니다.
QNetworkRequest::setHttp2Configuration(), QNetworkRequest::http2Configuration(), QNetworkAccessManager 를참조하세요 .
멤버 함수 문서
QHttp2Configuration::QHttp2Configuration()
기본값은 QHttp2Configuration 객체를 생성합니다.
이러한 구성에는 다음과 같은 값이 있습니다:
- 서버 푸시가 비활성화됨
- 허프만 문자열 압축이 활성화됩니다.
- 연결 수준 흐름 제어를 위한 창 크기는 65535 옥텟입니다.
- 스트림 수준 흐름 제어를 위한 창 크기는 65535 옥텟입니다.
- 프레임 크기는 16384 옥텟입니다.
QHttp2Configuration::QHttp2Configuration(const QHttp2Configuration &other)
복사 - 이 QHttp2Configuration을 구성합니다.
[noexcept]
QHttp2Configuration::QHttp2Configuration(QHttp2Configuration &&other)
이동 - 다음에서 이 QHttp2Configuration을 구성합니다. other
[noexcept]
QHttp2Configuration::~QHttp2Configuration()
파괴자.
bool QHttp2Configuration::huffmanCompressionEnabled() const
HPACK의 허프만 코딩이 활성화된 경우 true
을 반환합니다.
setHuffmanCompressionEnabled도 참조하세요 .
unsigned int QHttp2Configuration::maxFrameSize() const
HTTP/2 프레임이 가질 수 있는 최대 페이로드 크기를 반환합니다. 기본(초기) 값은 16384 옥텟입니다.
setMaxFrameSize()도 참조하세요 .
bool QHttp2Configuration::serverPushEnabled() const
서버 푸시가 활성화된 경우 true를 반환합니다.
참고: 기본적으로 QNetworkAccessManager 은 '설정' 프레임을 통해 서버 푸시를 비활성화합니다.
setServerPushEnabled 를참조하세요 .
unsigned int QHttp2Configuration::sessionReceiveWindowSize() const
연결 수준 흐름 제어를 위한 창 크기를 반환합니다. 기본값 QNetworkAccessManager 은 2147483647 옥텟을 사용합니다.
setSessionReceiveWindowSize()도 참조하세요 .
void QHttp2Configuration::setHuffmanCompressionEnabled(bool enable)
enable 이 true
인 경우 HPACK 압축은 허프만 코딩을 사용하여 문자열을 추가로 압축합니다. 기본적으로 활성화됩니다.
참고: 이 매개변수는 QNetworkAccessManager 에서 전송하는 'HEADERS' 프레임에만 영향을 줍니다.
huffmanCompressionEnabled 를참조하세요 .
bool QHttp2Configuration::setMaxFrameSize(unsigned int size)
QNetworkAccessManager 이 초기 설정 프레임을 전송할 때 서버에 알릴 최대 프레임 크기를 설정합니다.
참고: 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
를 반환합니다.
© 2025 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.