abstract struct HTTP2::Frame
- HTTP2::Frame
- Struct
- Value
- Object
Overview
This is an abstract superclass for all HTTP/2 Frames. The reference specification can be found at https://datatracker.ietf.org/doc/html/rfc7540#section-6.
A frame is a basic unit of data transmission in HTTP/2. Every frame has a type, specified by an 8-bit type code, a stream identifier which indicates which stream the frame belongs to, and a payload. Most Frame types also define a set of flags that differ based on the type of the Frame. Specific Frame types may have other considerations, such as padding length and padding bytes in Data frames, so consult the implementation and the reference specification for more information.
Direct Known Subclasses
- HTTP2::Frame::AltSvc
- HTTP2::Frame::Continuation
- HTTP2::Frame::Data
- HTTP2::Frame::GoAway
- HTTP2::Frame::Headers
- HTTP2::Frame::Ping
- HTTP2::Frame::Priority
- HTTP2::Frame::PushPromise
- HTTP2::Frame::ResetStream
- HTTP2::Frame::Settings
- HTTP2::Frame::WindowUpdate
Defined in:
frame.crframe/headers_helper.cr
frame/padding_helper.cr
Constant Summary
-
TYPES =
[HTTP2::Frame::Data, HTTP2::Frame::Headers, HTTP2::Frame::Priority, HTTP2::Frame::ResetStream, HTTP2::Frame::Settings, HTTP2::Frame::PushPromise, HTTP2::Frame::Ping, HTTP2::Frame::GoAway, HTTP2::Frame::WindowUpdate, HTTP2::Frame::Continuation, HTTP2::Frame::AltSvc]
Constructors
Class Method Summary
Instance Method Summary
- #data
-
#error?
This method may be overridden to do error checking on the frame, to determine if it might be invalid in some way.
- #initialize
- #payload : Bytes
- #stream
- #stream_id : UInt32
-
#to_s(io)
This will output the frame in a wire compatible format.
Constructor Detail
Class Method Detail
Instance Method Detail
This method may be overridden to do error checking on the frame, to determine if it might be invalid in some way.
This will output the frame in a wire compatible format. All frames are formatted identically.