Documentation

Hale.Http3.Network.HTTP3.Frame

HTTP/3 frame types (RFC 9114 Section 7). $$\text{FrameType}$$ enumerates the standard frame type identifiers.

  • data : FrameType

    DATA frame (0x0). Carries request or response body data.

  • headers : FrameType

    HEADERS frame (0x1). Carries an encoded header block.

  • cancelPush : FrameType

    CANCEL_PUSH frame (0x3). Cancels a server push.

  • settings : FrameType

    SETTINGS frame (0x4). Conveys configuration parameters.

  • pushPromise : FrameType

    PUSH_PROMISE frame (0x5). Server push initiation.

  • goaway : FrameType

    GOAWAY frame (0x7). Initiates graceful shutdown.

  • maxPushId : FrameType

    MAX_PUSH_ID frame (0xD). Controls server push.

  • unknown (id : UInt64) : FrameType

    Unknown/extension frame type.

Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[implicit_reducible]
      Equations
      • One or more equations did not get rendered due to their size.

      Roundtrip theorems for FrameType fromId/toId.

      The maximum value encodable as a QUIC variable-length integer. $$2^{62} - 1 = 4611686018427387903$$

      Equations
      Instances For

        Encode a value as a QUIC variable-length integer (RFC 9000 Section 16). Uses the minimum number of bytes for the given value. $$\text{encodeVarInt} : \text{UInt64} \to \text{ByteArray}$$

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          def Network.HTTP3.decodeVarInt (buf : ByteArray) (offset : Nat := 0) :

          Decode a QUIC variable-length integer from a ByteArray at the given offset. $$\text{decodeVarInt} : \text{ByteArray} \to \mathbb{N} \to \text{Option}(\text{UInt64} \times \mathbb{N})$$ Returns the decoded value and the number of bytes consumed, or none on error.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            An HTTP/3 frame: type + payload. $$\text{Frame} = \text{FrameType} \times \text{ByteArray}$$

            Instances For

              Encode an HTTP/3 frame to wire format: varint(type) ++ varint(length) ++ payload. $$\text{encode} : \text{Frame} \to \text{ByteArray}$$

              Equations
              Instances For
                def Network.HTTP3.Frame.decode (buf : ByteArray) (offset : Nat := 0) :

                Decode an HTTP/3 frame from wire format at the given offset. $$\text{decode} : \text{ByteArray} \to \mathbb{N} \to \text{Option}(\text{Frame} \times \mathbb{N})$$ Returns the decoded frame and total bytes consumed, or none on error.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For

                  HTTP/3 settings values. $$\text{H3Settings} = \{ \text{maxFieldSectionSize} : \mathbb{N},\; \ldots \}$$

                  • maxFieldSectionSize : Nat

                    Maximum size of a header section (SETTINGS_MAX_FIELD_SECTION_SIZE, 0x6).

                  • qpackMaxTableCapacity : Nat

                    Maximum QPACK dynamic table capacity (SETTINGS_QPACK_MAX_TABLE_CAPACITY, 0x1).

                  • qpackBlockedStreams : Nat

                    Maximum number of blocked QPACK streams (SETTINGS_QPACK_BLOCKED_STREAMS, 0x7).

                  Instances For
                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      Equations
                      Instances For

                        Default HTTP/3 settings. $$\text{defaultH3Settings} = \text{H3Settings}\{\}$$

                        Equations
                        Instances For

                          Encode HTTP/3 settings as a sequence of varint(id) ++ varint(value) pairs. Only non-zero settings are included. $$\text{encode} : \text{H3Settings} \to \text{ByteArray}$$

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For

                            Decode HTTP/3 settings from a byte buffer. $$\text{decode} : \text{ByteArray} \to \text{Option}(\text{H3Settings})$$

                            Equations
                            Instances For