Expand description
The SPDY/3.1 frames and their encoding, see https://www.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3-1/.
Header blocks are compressed with zlib and a preset dictionary. Each
direction of a connection keeps one compression context for all its header
blocks, so every frame which carries one has to pass the same Decoder
or Encoder, also the ones which are otherwise ignored. The server only
sends empty header blocks, the Encoder stores them uncompressed in the
zlib stream instead of compressing them.
Structsยง
- Decoder ๐
- Reads the frames of one direction of a connection.
- Encoder ๐
- Writes the frames of one direction of a connection.
- Headers ๐
- The headers of a stream. SPDY requires lowercase names, multiple values of a name are joined with NUL bytes.
Enumsยง
- Frame ๐
- A single SPDY frame. Only the frames and fields the server acts on are
represented, see
Frame::Ignored. Its debug output shows only the length of data, which may carry secrets, like typed passwords or forwarded traffic.
Constantsยง
- DATA_
CHUNK_ ๐LEN - How much of a data frame the server reads at once. Larger frames get handed to their stream in parts, so that the server does not buffer them as a whole. Go clients send 32 KiB per frame.
- DICTIONARY ๐
- The preset dictionary for the header compression, from the specification.
- DICTIONARY_
ID ๐ - The Adler-32 checksum of the dictionary, which the zlib header names.
- FLAG_
FIN ๐ - The flag which ends the sending side of a stream, on SYN_STREAM, SYN_REPLY, HEADERS and data frames.
- GOAWAY_
OK ๐ - GOAWAY status: the connection ends normally.
- GOAWAY_
PROTOCOL_ ๐ERROR - GOAWAY status: the client violated the protocol.
- HEADER_
LEN ๐ - The length of the common header of all frames.
- MAX_
CONTROL_ ๐FRAME_ LEN - The largest control frame a client may send. The ones Kubernetes clients send carry a few short headers.
- MAX_
DATA_ ๐FRAME_ LEN - The largest frame the protocol allows, its length has 24 bits.
- MAX_
HEADERS ๐ - The most headers of a stream, Kubernetes clients send up to three. Each takes more memory than the bytes of its block.
- MAX_
HEADER_ ๐BLOCK_ LEN - The largest decompressed header block, which bounds what a small compressed block may expand to. Kubernetes clients send around a hundred bytes, a stream holds its headers as long as it is open. A larger block fails the connection, like any header block which does not decode, the compression context of the connection would be out of sync otherwise.
- STATUS_
CANCEL ๐ - RST_STREAM status: the stream is not needed anymore. spdystream resets with it as well, also for streams it rejects.
- STATUS_
PROTOCOL_ ๐ERROR - RST_STREAM status: the frame violates the protocol.
- STATUS_
REFUSED_ ๐STREAM - RST_STREAM status: the stream got refused before any processing.
- TYPE_
GOAWAY ๐ - TYPE_
HEADERS ๐ - TYPE_
PING ๐ - TYPE_
RST_ ๐STREAM - TYPE_
SYN_ ๐REPLY - TYPE_
SYN_ ๐STREAM - VERSION ๐
- The protocol version of the control frames.