HTTP.WebTransport.Promise (http_web_transport v0.10.0)

View Source

Promise-like handle for WebTransport lifecycle states.

The promise is resolved by the owning HTTP.WebTransport.Session process. Use await/2 to block until the value is resolved or rejected.

Summary

Types

kind()

@type kind() :: :ready | :closed | :draining

t()

@type t() :: %HTTP.WebTransport.Promise{kind: kind(), pid: pid()}

Functions

await(promise, timeout \\ :infinity)

@spec await(t(), timeout()) :: :ok | {:ok, term()} | {:error, term()}