QuicHttp3.Stream (elixir_quic_http3 v0.16.0)

View Source

Pure HTTP/3 classification for QUIC stream identifiers and type prefixes.

Stream payload ownership remains with the transport implementation. This module only validates the identifier bits and decodes the first varint on a unidirectional stream.

Summary

Types

direction()

@type direction() :: :bidi | :uni

initiator()

@type initiator() :: :client | :server

role()

@type role() :: :client | :server

stream_type()

@type stream_type() ::
  :control | :push | :qpack_encoder | :qpack_decoder | {:unknown, pos_integer()}

Functions

classify(id, role)

@spec classify(non_neg_integer(), role()) ::
  {:ok, :request | :unidirectional | :peer_bidi} | {:error, term()}

decode_type(data)

@spec decode_type(binary()) :: {:ok, stream_type(), binary()} | :more

direction(id)

@spec direction(non_neg_integer()) :: direction() | {:error, :invalid_stream_id}

initiator(id)

@spec initiator(non_neg_integer()) :: initiator() | {:error, :invalid_stream_id}

local?(id, role)

@spec local?(non_neg_integer(), role()) :: boolean()

type_id(arg1)

@spec type_id(stream_type()) :: non_neg_integer()