41 constexpr uint8_t
none = 0x0;
43 constexpr uint8_t
ack = 0x1;
71 auto serialize() const -> std::vector<uint8_t>;
107 auto serialize() const -> std::vector<uint8_t>;
119 auto payload() const -> std::span<const uint8_t>;
128 std::vector<uint8_t> payload_;
149 bool end_stream =
false,
bool padded =
false);
164 auto is_end_stream()
const -> bool;
170 auto is_padded()
const -> bool;
176 auto data()
const -> std::span<const uint8_t>;
199 headers_frame(uint32_t stream_id, std::vector<uint8_t> header_block,
200 bool end_stream =
false,
bool end_headers =
true);
208 static auto parse(
const frame_header& hdr, std::span<const uint8_t> payload)
215 auto is_end_stream()
const -> bool;
221 auto is_end_headers()
const -> bool;
227 auto header_block()
const -> std::span<const uint8_t>;
281 static auto parse(
const frame_header& hdr, std::span<const uint8_t> payload)
288 auto settings()
const ->
const std::vector<setting_parameter>&;
294 auto is_ack()
const -> bool;
322 static auto parse(
const frame_header& hdr, std::span<const uint8_t> payload)
351 explicit ping_frame(std::array<uint8_t, 8> opaque_data = {},
360 static auto parse(
const frame_header& hdr, std::span<const uint8_t> payload)
367 auto opaque_data()
const ->
const std::array<uint8_t, 8>&;
373 auto is_ack()
const -> bool;
396 std::vector<uint8_t> additional_data = {});
404 static auto parse(
const frame_header& hdr, std::span<const uint8_t> payload)
411 auto last_stream_id()
const -> uint32_t;
423 auto additional_data()
const -> std::span<const uint8_t>;
453 static auto parse(
const frame_header& hdr, std::span<const uint8_t> payload)
460 auto window_size_increment()
const -> uint32_t;
474 internal_error = 0x2,
DATA frame (RFC 7540 Section 6.1)
std::vector< uint8_t > data_
Actual data without padding.
Base class for HTTP/2 frames.
frame()=default
Default constructor.
GOAWAY frame (RFC 7540 Section 6.8)
std::vector< uint8_t > additional_data_
Debug data.
uint32_t error_code_
Error code.
uint32_t last_stream_id_
Last stream ID.
PING frame (RFC 7540 Section 6.7)
std::array< uint8_t, 8 > opaque_data_
8-byte opaque data
RST_STREAM frame (RFC 7540 Section 6.4)
uint32_t error_code_
Error code.
SETTINGS frame (RFC 7540 Section 6.5)
std::vector< setting_parameter > settings_
Settings parameters.
WINDOW_UPDATE frame (RFC 7540 Section 6.9)
uint32_t window_size_increment_
Window size increment.
constexpr uint8_t priority
constexpr uint8_t end_stream
constexpr uint8_t end_headers
error_code
HTTP/2 error codes (RFC 7540 Section 7)
@ compression_error
Compression state not updated.
@ cancel
Stream cancelled.
@ settings_timeout
Settings not acknowledged.
@ refused_stream
Stream not processed.
@ connect_error
TCP connection error for CONNECT.
@ no_error
Graceful shutdown.
@ protocol_error
Protocol error detected.
@ frame_size_error
Frame size incorrect.
@ flow_control_error
Flow-control limits exceeded.
@ inadequate_security
Negotiated TLS parameters not acceptable.
@ stream_closed
Frame received for closed stream.
@ enhance_your_calm
Processing capacity exceeded.
@ http_1_1_required
Use HTTP/1.1 for the request.
setting_identifier
SETTINGS frame parameter identifiers (RFC 7540 Section 6.5.2)
@ max_frame_size
SETTINGS_MAX_FRAME_SIZE.
@ max_header_list_size
SETTINGS_MAX_HEADER_LIST_SIZE.
@ max_concurrent_streams
SETTINGS_MAX_CONCURRENT_STREAMS.
@ enable_push
SETTINGS_ENABLE_PUSH.
@ header_table_size
SETTINGS_HEADER_TABLE_SIZE.
@ initial_window_size
SETTINGS_INITIAL_WINDOW_SIZE.
frame_type
HTTP/2 frame types (RFC 7540 Section 6)
@ settings
SETTINGS frame.
@ rst_stream
RST_STREAM frame.
@ window_update
WINDOW_UPDATE frame.
@ continuation
CONTINUATION frame.
@ priority
PRIORITY frame.
@ push_promise
PUSH_PROMISE frame.
Network-specific error and result type definitions.
SETTINGS frame parameter.
uint16_t identifier
Setting identifier.
uint32_t value
Setting value.