Skip to main content

Module frame

Module frame 

Source
Expand description

HTTP/2 frame types and parsing.

HTTP/2 frames have a common 9-byte header:

+-----------------------------------------------+
|                 Length (24)                   |
+---------------+---------------+---------------+
|   Type (8)    |   Flags (8)   |
+-+-------------+---------------+-------------------------------+
|R|                 Stream Identifier (31)                      |
+=+=============================================================+
|                   Frame Payload (0...)                      ...
+---------------------------------------------------------------+

Modules§

flags
Frame flags.

Structs§

ContinuationFrame
CONTINUATION frame (type=0x9).
DataFrame
DATA frame (type=0x0).
FrameDecoder
Frame decoder that parses HTTP/2 frames from a byte buffer.
FrameEncoder
Frame encoder that writes HTTP/2 frames to a byte buffer.
FrameHeader
Raw frame header.
GoAwayFrame
GOAWAY frame (type=0x7).
HeadersFrame
HEADERS frame (type=0x1).
PingFrame
PING frame (type=0x6).
Priority
Stream priority information.
PriorityFrame
PRIORITY frame (type=0x2).
PushPromiseFrame
PUSH_PROMISE frame (type=0x5).
RstStreamFrame
RST_STREAM frame (type=0x3).
Setting
Individual setting in a SETTINGS frame.
SettingsFrame
SETTINGS frame (type=0x4).
StreamId
Stream identifier (31 bits, high bit reserved).
UnknownFrame
Unknown frame type.
WindowUpdateFrame
WINDOW_UPDATE frame (type=0x8).

Enums§

ErrorCode
HTTP/2 error codes (RFC 7540 Section 7).
Frame
Parsed HTTP/2 frame.
FrameError
Frame parsing/encoding errors.
FrameType
HTTP/2 frame types (RFC 7540 Section 6).
SettingId
Known setting identifiers (RFC 7540 Section 6.5.2).

Constants§

CONNECTION_PREFACE
Connection preface sent by clients.
DEFAULT_HEADER_TABLE_SIZE
Default header table size for HPACK.
DEFAULT_INITIAL_WINDOW_SIZE
Default initial window size for flow control.
DEFAULT_MAX_CONCURRENT_STREAMS
Maximum concurrent streams default.
DEFAULT_MAX_FRAME_SIZE
Default maximum frame size (16 KB).
FRAME_HEADER_SIZE
Frame header size in bytes.
MAX_FRAME_SIZE
Maximum frame size allowed by HTTP/2 spec (2^24 - 1).