ankh v0.4.5 Ankh.Stream

HTTP/2 stream process

Process implementing the HTTP/2 stream state machine

Link to this section Summary

Types

Stream HBF type

Stream id

Stream mode

Reserve mode

Stream states

t()

Stream process

Functions

Returns a specification to start this module under a supervisor

Closes the stream

Process a received frame for the stream

Process a received frame for the stream

Reserves the stream for push_promise

Process and send a frame on the stream

Link to this section Types

Link to this type hbf_type()
hbf_type() :: :headers | :push_promise

Stream HBF type

Stream id

Link to this type mode()
mode() :: :reassemble | :streaming

Stream mode

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

Stream process

Link to this section Functions

Link to this function child_spec(arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function close(stream)
close(t()) :: term()

Closes the stream

Link to this function recv(stream, frame)
recv(t(), Ankh.Frame.t()) :: term()

Process a received frame for the stream

Link to this function recv_raw(stream, type, data)
recv_raw(t(), Ankh.Frame.type(), data :: binary()) :: term()

Process a received frame for the stream

Link to this function reserve(stream, mode)
reserve(t(), reserve_mode()) :: term()

Reserves the stream for push_promise

Link to this function send(stream, frame)
send(t(), Ankh.Frame.t()) :: term()

Process and send a frame on the stream

Link to this function start_link(connection, id, recv_table, send_table, max_frame_size, controlling_process \\ nil, mode \\ :reassemble)
start_link(
  Ankh.Connection.connection(),
  id(),
  pid(),
  pid(),
  integer(),
  pid() | nil,
  mode()
) :: GenServer.on_start()

Starts a new stream fot the provided connection