ankh v0.6.0 Ankh.Stream
HTTP/2 stream process
Process implementing the HTTP/2 stream state machine
Link to this section Summary
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
Starts a new stream fot the provided connection
Link to this section Types
Link to this type
hbf_type()
hbf_type()
hbf_type() :: :headers | :push_promise
hbf_type() :: :headers | :push_promise
Stream HBF type
Link to this type
id()
id()
id() :: integer()
id() :: integer()
Stream id
Link to this type
reserve_mode()
reserve_mode()
reserve_mode() :: :local | :remote
reserve_mode() :: :local | :remote
Reserve mode
Link to this type
state()
state()
state() ::
:idle
| :open
| :closed
| :half_closed_local
| :half_closed_remote
| :reserved_remote
| :reserved_local
state() :: :idle | :open | :closed | :half_closed_local | :half_closed_remote | :reserved_remote | :reserved_local
Stream states
Link to this type
t()
t()
t() :: GenServer.server()
t() :: GenServer.server()
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)
Closes the stream
Link to this function
recv(stream, frame)
recv(stream, frame)
recv(t(), Ankh.Frame.t()) :: {:ok, state()} | {:error, term()}
recv(t(), Ankh.Frame.t()) :: {:ok, state()} | {:error, term()}
Process a received frame for the stream
Link to this function
recv_raw(stream, type, data)
recv_raw(stream, type, data)
recv_raw(t(), Ankh.Frame.type(), data :: binary()) ::
{:ok, state()} | {:error, term()}
recv_raw(t(), Ankh.Frame.type(), data :: binary()) :: {:ok, state()} | {:error, term()}
Process a received frame for the stream
Link to this function
reserve(stream, mode)
reserve(stream, mode)
reserve(t(), reserve_mode()) :: term()
reserve(t(), reserve_mode()) :: term()
Reserves the stream for push_promise
Link to this function
send(stream, frame)
send(stream, frame)
send(t(), Ankh.Frame.t()) :: {:ok, state()} | {:error, term()}
send(t(), Ankh.Frame.t()) :: {:ok, state()} | {:error, 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, options \\ [])
start_link(connection, id, recv_table, send_table, max_frame_size, controlling_process, options \\ [])
start_link(
Ankh.Connection.connection(),
id(),
pid(),
pid(),
integer(),
pid(),
GenServer.options()
) :: GenServer.on_start()
start_link( Ankh.Connection.connection(), id(), pid(), pid(), integer(), pid(), GenServer.options() ) :: GenServer.on_start()
Starts a new stream fot the provided connection