ankh v0.8.0 Ankh.HTTP2.Stream

HTTP/2 stream process

Struct implementing the HTTP/2 stream state machine

Link to this section Summary

Types

Stream HBF type

Stream id

Reserve mode

Stream states

t()

Stream process

Functions

Starts a new stream fot the provided connection

Process a received frame for the stream

Process and send a frame on the stream

Link to this section Types

Link to this type

data_type()

data_type() :: :headers | :data | :push_promise
Link to this type

end_stream()

end_stream() :: boolean()
Link to this type

hbf_type()

hbf_type() :: :headers | :push_promise | nil

Stream HBF type

Stream id

Link to this type

reserve_mode()

reserve_mode() :: :local | :remote

Reserve mode

Link to this type

state()

state() ::
  :idle
  | :open
  | :closed
  | :half_closed_local
  | :half_closed_remote
  | :reserved_remote
  | :reserved_local

Stream states

Link to this type

t()

t() :: %Ankh.HTTP2.Stream{
  id: term(),
  recv_hbf: term(),
  recv_hbf_es: term(),
  recv_hbf_type: term(),
  reference: term(),
  state: term(),
  window_size: term()
}

Stream process

Link to this section Functions

Link to this function

adjust_window_size(stream, old_window_size, new_window_size)

adjust_window_size(t(), integer(), integer()) :: t()

Adjusts the stream window size

Link to this macro

is_local_stream(last_local_stream_id, stream_id)

(macro)
Link to this function

new(id, window_size)

new(id(), integer()) :: t()

Starts a new stream fot the provided connection

Link to this function

recv(stream, frame)

recv(t(), Ankh.HTTP2.Frame.t()) :: {:ok, t(), data() | nil} | {:error, any()}

Process a received frame for the stream

Link to this function

send(stream, frame)

send(t(), Ankh.HTTP2.Frame.t()) :: {:ok, t()} | {:error, any()}

Process and send a frame on the stream