QuicHttp3.Stream (elixir_quic_http3 v0.16.0)
View SourcePure 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
@type direction() :: :bidi | :uni
@type initiator() :: :client | :server
@type role() :: :client | :server
@type stream_type() :: :control | :push | :qpack_encoder | :qpack_decoder | {:unknown, pos_integer()}
Functions
@spec classify(non_neg_integer(), role()) :: {:ok, :request | :unidirectional | :peer_bidi} | {:error, term()}
@spec decode_type(binary()) :: {:ok, stream_type(), binary()} | :more
@spec direction(non_neg_integer()) :: direction() | {:error, :invalid_stream_id}
@spec initiator(non_neg_integer()) :: initiator() | {:error, :invalid_stream_id}
@spec local?(non_neg_integer(), role()) :: boolean()
@spec type_id(stream_type()) :: non_neg_integer()