NexusForce 1.0.0
A rigorously engineered full-stack C++ backend library.
载入中...
搜索中...
未找到
http2_protocol.hpp 文件参考

HTTP/2 协议帧、HPACK 编解码器与流控制 更多...

http2_protocol.hpp 的引用(Include)关系图:

浏览该文件的源代码.

struct  neforce::http::http2_frame_header
 HTTP/2 帧头(RFC 7540 §4.1),9 字节 packed 布局 更多...
struct  neforce::http::http2_settings_entry
 SETTINGS 帧中的单个参数条目 更多...
struct  neforce::http::http2_priority
 流优先级信息(RFC 7540 §5.3) 更多...
struct  neforce::http::http2_data_frame
 DATA 帧(RFC 7540 §6.1) 更多...
struct  neforce::http::http2_headers_frame
 HEADERS 帧(RFC 7540 §6.2) 更多...
struct  neforce::http::http2_rst_stream_frame
 RST_STREAM 帧(RFC 7540 §6.4) 更多...
struct  neforce::http::http2_settings_frame
 SETTINGS 帧(RFC 7540 §6.5) 更多...
struct  neforce::http::http2_ping_frame
 PING 帧(RFC 7540 §6.7) 更多...
struct  neforce::http::http2_goaway_frame
 GOAWAY 帧(RFC 7540 §6.8) 更多...
struct  neforce::http::http2_window_update_frame
 WINDOW_UPDATE 帧(RFC 7540 §6.9) 更多...
struct  neforce::http::http2_push_promise_frame
 PUSH_PROMISE 帧(RFC 7540 §6.6) 更多...
struct  neforce::http::http2_continuation_frame
 CONTINUATION 帧(RFC 7540 §6.10) 更多...
struct  neforce::http::hpack_header_field
 HPACK 头部字段(名值对) 更多...
class  neforce::http::hpack_encoder
 HPACK 头部编码器(RFC 7541) 更多...
class  neforce::http::hpack_decoder
 HPACK 头部解码器(RFC 7541) 更多...
class  neforce::http::http2_framer
 HTTP/2 帧编解码器 更多...
class  neforce::http::http2_stream
 HTTP/2 流状态机 更多...
class  neforce::http::http2_flow_control
 HTTP/2 流量控制器 更多...
class  neforce::http::http2_settings
 HTTP/2 连接设置管理器 更多...

枚举

enum class  neforce::http::http2_frame_type : uint8_t {
  http2_frame_type::DATA = 0x0 , http2_frame_type::HEADERS = 0x1 , http2_frame_type::PRIORITY = 0x2 , http2_frame_type::RST_STREAM = 0x3 ,
  http2_frame_type::SETTINGS = 0x4 , http2_frame_type::PUSH_PROMISE = 0x5 , http2_frame_type::PING = 0x6 , http2_frame_type::GOAWAY = 0x7 ,
  http2_frame_type::WINDOW_UPDATE = 0x8 , http2_frame_type::CONTINUATION = 0x9
}
 HTTP/2 帧类型(RFC 7540 §6) 更多...
enum class  neforce::http::http2_error : uint32_t {
  http2_error::NO_ERROR = 0x0 , http2_error::PROTOCOL_ERROR = 0x1 , http2_error::INTERNAL_ERROR = 0x2 , http2_error::FLOW_CONTROL_ERROR = 0x3 ,
  http2_error::SETTINGS_TIMEOUT = 0x4 , http2_error::STREAM_CLOSED = 0x5 , http2_error::FRAME_SIZE_ERROR = 0x6 , http2_error::REFUSED_STREAM = 0x7 ,
  http2_error::CANCEL = 0x8 , http2_error::COMPRESSION_ERROR = 0x9 , http2_error::CONNECT_ERROR = 0xA , http2_error::ENHANCE_YOUR_CALM = 0xB ,
  http2_error::INADEQUATE_SECURITY = 0xC , http2_error::HTTP_1_1_REQUIRED = 0xD
}
 HTTP/2 错误码(RFC 7540 §7) 更多...
enum class  neforce::http::http2_settings_id : uint16_t {
  http2_settings_id::HEADER_TABLE_SIZE = 0x1 , http2_settings_id::ENABLE_PUSH = 0x2 , http2_settings_id::MAX_CONCURRENT_STREAMS = 0x3 , http2_settings_id::INITIAL_WINDOW_SIZE = 0x4 ,
  http2_settings_id::MAX_FRAME_SIZE = 0x5 , http2_settings_id::MAX_HEADER_LIST_SIZE = 0x6
}
 HTTP/2 SETTINGS 参数标识符(RFC 7540 §6.5.2) 更多...
enum class  neforce::http::http2_stream_state
 HTTP/2 流状态(RFC 7540 §5.1)

变量

constexpr uint32_t neforce::http::HTTP2_MAX_FRAME_SIZE = 16384
 HTTP/2 最大帧负载大小(RFC 7540 §4.1)
constexpr uint32_t neforce::http::HTTP2_DEFAULT_HEADER_TABLE_SIZE = 4096
 HPACK 默认动态表大小
constexpr uint32_t neforce::http::HTTP2_DEFAULT_MAX_CONCURRENT_STREAMS = 100
 默认最大并发流数
constexpr uint32_t neforce::http::HTTP2_DEFAULT_INITIAL_WINDOW_SIZE = 65535
 默认初始流控窗口
constexpr uint32_t neforce::http::HTTP2_DEFAULT_MAX_HEADER_LIST_SIZE = 0xFFFFFFFF
 默认最大头部列表大小
constexpr size_t neforce::http::HPACK_STATIC_TABLE_SIZE = 61
 HPACK 静态表条目数
constexpr string_view neforce::http::HTTP2_CLIENT_PREFACE = "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n"
 HTTP/2 客户端连接前言(RFC 7540 §3.5)

详细描述

HTTP/2 协议帧、HPACK 编解码器与流控制

实现 RFC 7540(HTTP/2)帧格式、RFC 7541(HPACK)头部压缩、 流状态机和连接/流级流量控制。

在文件 http2_protocol.hpp 中定义.