Skip to main content

Module header

Module header 

Source
Expand description

PO Frame Header — the compact binary header that precedes every frame.

§Wire Layout

┌─────────┬──────────────┬──────────────┬──────────────┐
│ Byte 0  │ VarInt       │ VarInt       │ VarInt       │
│ Type +  │ Channel ID   │ Stream ID    │ Payload Len  │
│ Flags   │ (1–8 bytes)  │ (1–8 bytes)  │ (1–8 bytes)  │
└─────────┴──────────────┴──────────────┴──────────────┘

Byte 0 bit layout:
┌───┬───┬───┬───┬───┬───┬───┬───┐
│ 7 │ 6 │ 5 │ 4 │ 3 │ 2 │ 1 │ 0 │
│CTL│PRI│ENC│RSV│    FrameType   │
└───┴───┴───┴───┴───┴───┴───┴───┘

Minimum header size: 4 bytes (1 type/flags + 3×1-byte VarInts). Maximum header size: 25 bytes (1 type/flags + 3×8-byte VarInts).

Structs§

FrameFlags
Flags that modify how a frame is processed.
FrameHeader
A decoded PO frame header.