gen_state_machine process owning a single HTTP/2 connection.
Manages stream multiplexing, caller monitoring, and GOAWAY drain logic. The process transitions from :connected to :draining when a GOAWAY is received or the server closes the connection, completing in-flight requests before stopping.
Summary
Functions
Returns the number of stream slots available on this connection.
Returns a specification to start this module under a supervisor.
Closes the connection, failing any in-flight requests.
Returns the server's max concurrent streams setting.
Returns true if the connection is open and accepting new streams.
Sends an HTTP/2 request and blocks until the response is complete.
Starts the connection worker and performs the HTTP/2 handshake.
Types
Functions
@spec available_streams(pid()) :: non_neg_integer()
Returns the number of stream slots available on this connection.
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec close(pid()) :: :ok
Closes the connection, failing any in-flight requests.
@spec max_streams(pid()) :: non_neg_integer()
Returns the server's max concurrent streams setting.
Returns true if the connection is open and accepting new streams.
@spec request(pid(), atom(), String.t(), list(), iodata() | nil, keyword()) :: {:ok, Quiver.Response.t()} | {:error, term()}
Sends an HTTP/2 request and blocks until the response is complete.
@spec start_link(keyword()) :: GenServer.on_start()
Starts the connection worker and performs the HTTP/2 handshake.