MOQX.Transport.Conn.Stream (moqx v0.8.1)

Copy Markdown View Source

Opaque QUIC stream handle returned by MOQX.Transport.

Summary

Functions

Creates functional sender-side state for this stream.

Types

t()

@type t() :: %MOQX.Transport.Conn.Stream{
  backend: MOQX.Transport.BackendRef.t(),
  info: MOQX.Transport.Conn.Stream.Info.t()
}

Functions

sender(stream)

@spec sender(t()) ::
  {:ok, MOQX.Transport.Conn.Stream.Sender.t()}
  | {:error, :send_side_unavailable}

Creates functional sender-side state for this stream.

The returned sender owns accepted-send correlation. It is the state value a caller should keep when it wants to treat stream send completions as backend credit.