Bandit.HTTP2.Stream (Bandit v0.3.6) View Source

Carries out state management transitions per RFC7540§5.1. Anything having to do with the internal state of a stream is handled in this module. Note that sending of frames on behalf of a stream is a bit of a split responsibility: the stream itself may update state depending on the value of the end_stream flag (this is a stream concern and thus handled here), but the sending of the data over the wire is a connection concern as it must be serialized properly & is subject to flow control at a connection level

Link to this section Summary

Types

An HTTP/2 stream state

An HTTP/2 stream identifier

t()

A single HTTP/2 stream

Link to this section Types

Specs

state() ::
  :reserved_local | :idle | :open | :local_closed | :remote_closed | :closed

An HTTP/2 stream state

Specs

stream_id() :: non_neg_integer()

An HTTP/2 stream identifier

Specs

t() :: %Bandit.HTTP2.Stream{
  pid: pid() | nil,
  recv_window_size: term(),
  send_window_size: term(),
  state: state(),
  stream_id: stream_id()
}

A single HTTP/2 stream

Link to this section Functions

Link to this function

get_send_window_size(stream)

View Source
Link to this function

recv_end_of_stream(stream, bool)

View Source
Link to this function

recv_headers(stream, headers, peer, plug)

View Source
Link to this function

recv_rst_stream(stream, error_code)

View Source
Link to this function

recv_window_update(stream, increment)

View Source
Link to this function

send_end_of_stream(stream, bool)

View Source
Link to this function

send_push_headers(stream, headers)

View Source
Link to this function

start_push(stream, headers, peer, plug)

View Source
Link to this function

stream_terminated(stream, reason)

View Source
Link to this function

terminate_stream(stream, reason)

View Source