Bandit.HTTP2.StreamCollection (Bandit v0.3.5) View Source
Represents a collection of HTTP/2 streams, accessible by stream id or pid. Provides the ability to track streams with any identifier, even though it only manages explicit state for existing (current) streams.
Link to this section Summary
Link to this section Types
Specs
t() :: %Bandit.HTTP2.StreamCollection{ last_local_stream_id: Bandit.HTTP2.Stream.stream_id(), last_remote_stream_id: Bandit.HTTP2.Stream.stream_id(), streams: %{ required(Bandit.HTTP2.Stream.stream_id()) => Bandit.HTTP2.Stream.t() } }
A collection of Stream structs, accessisble by id or pid
Link to this section Functions
Specs
get_active_stream_by_pid(t(), pid()) :: {:ok, Bandit.HTTP2.Stream.t()} | {:error, :no_stream}
Specs
get_stream(t(), Bandit.HTTP2.Stream.stream_id()) :: {:ok, Bandit.HTTP2.Stream.t()}
Specs
last_remote_stream_id(t()) :: Bandit.HTTP2.Stream.stream_id()
Specs
next_local_stream_id(t()) :: Bandit.HTTP2.Stream.stream_id()
Specs
put_stream(t(), Bandit.HTTP2.Stream.t()) :: {:ok, t()} | {:error, :invalid_stream}