|
Network System 0.1.1
High-performance modular networking library for scalable client-server applications
|
GOAWAY frame (RFC 7540 Section 6.8) More...
#include <frame.h>


Public Member Functions | |
| goaway_frame (uint32_t last_stream_id, uint32_t error_code, std::vector< uint8_t > additional_data={}) | |
| Construct GOAWAY frame. | |
| auto | last_stream_id () const -> uint32_t |
| Get last stream ID. | |
| auto | error_code () const -> uint32_t |
| Get error code. | |
| auto | additional_data () const -> std::span< const uint8_t > |
| Get additional debug data. | |
Public Member Functions inherited from kcenon::network::protocols::http2::frame | |
| frame ()=default | |
| Default constructor. | |
| frame (const frame_header &hdr, std::vector< uint8_t > payload) | |
| Construct frame with header and payload. | |
| auto | serialize () const -> std::vector< uint8_t > |
| Serialize frame to bytes. | |
| auto | header () const -> const frame_header & |
| Get frame header. | |
| auto | payload () const -> std::span< const uint8_t > |
| Get frame payload. | |
| virtual | ~frame ()=default |
| Virtual destructor. | |
Static Public Member Functions | |
| static auto | parse (const frame_header &hdr, std::span< const uint8_t > payload) -> Result< std::unique_ptr< goaway_frame > > |
| Parse GOAWAY frame from raw bytes. | |
Static Public Member Functions inherited from kcenon::network::protocols::http2::frame | |
| static auto | parse (std::span< const uint8_t > data) -> Result< std::unique_ptr< frame > > |
| Parse frame from raw bytes. | |
Private Attributes | |
| uint32_t | last_stream_id_ |
| Last stream ID. | |
| uint32_t | error_code_ |
| Error code. | |
| std::vector< uint8_t > | additional_data_ |
| Debug data. | |
Additional Inherited Members | |
Protected Attributes inherited from kcenon::network::protocols::http2::frame | |
| frame_header | header_ |
| Frame header. | |
| std::vector< uint8_t > | payload_ |
| Frame payload. | |
GOAWAY frame (RFC 7540 Section 6.8)
GOAWAY frames are used to initiate shutdown of a connection or to signal serious error conditions.
| kcenon::network::protocols::http2::goaway_frame::goaway_frame | ( | uint32_t | last_stream_id, |
| uint32_t | error_code, | ||
| std::vector< uint8_t > | additional_data = {} ) |
Construct GOAWAY frame.
| last_stream_id | Last stream ID processed |
| error_code | Error code |
| additional_data | Optional additional debug data |
Definition at line 495 of file frame.cpp.
References additional_data_, error_code_, kcenon::network::protocols::http2::frame_header::flags, kcenon::network::protocols::http2::goaway, kcenon::network::protocols::http2::frame::header_, last_stream_id_, kcenon::network::protocols::http2::frame_header::length, kcenon::network::protocols::http2::frame_flags::none, kcenon::network::protocols::http2::frame::payload_, kcenon::network::protocols::http2::frame_header::stream_id, and kcenon::network::protocols::http2::frame_header::type.
| auto kcenon::network::protocols::http2::goaway_frame::additional_data | ( | ) | const -> std::span<const uint8_t> |
Get additional debug data.
Definition at line 552 of file frame.cpp.
References additional_data_.
| auto kcenon::network::protocols::http2::goaway_frame::error_code | ( | ) | const -> uint32_t |
| auto kcenon::network::protocols::http2::goaway_frame::last_stream_id | ( | ) | const -> uint32_t |
Get last stream ID.
Definition at line 542 of file frame.cpp.
References last_stream_id_.
|
static |
Parse GOAWAY frame from raw bytes.
| hdr | Frame header (must be GOAWAY type) |
| payload | Frame payload |
Definition at line 516 of file frame.cpp.
Referenced by kcenon::network::protocols::http2::frame::parse().

|
private |
Debug data.
Definition at line 428 of file frame.h.
Referenced by additional_data(), and goaway_frame().
|
private |
|
private |
Last stream ID.
Definition at line 426 of file frame.h.
Referenced by goaway_frame(), and last_stream_id().