Generic protocol-session runtime above CliSubprocessCore.Channel.
The session owns:
- channel lifecycle
- readiness state
- startup timeout
- outbound request tracking
- inbound peer-request tracking
- peer-request handler dispatch
- request timeouts
- close and interrupt normalization
Summary
Functions
Waits for the protocol session to become ready.
Returns a specification to start this module under a supervisor.
Stops the protocol session.
Returns protocol-session information.
Interrupts the underlying channel.
Sends an outbound protocol notification.
Sends an outbound protocol request and waits for the correlated reply.
Starts an unlinked protocol session.
Starts a linked protocol session.
Types
@type info_t() :: %{ adapter: module(), phase: :starting | :ready, ready_mode: ready_mode(), pending_requests: non_neg_integer(), pending_peer_requests: non_neg_integer(), channel: map() | %{} }
@type ready_mode() :: :immediate | :startup_complete | :adapter_event
@type t() :: pid()
Functions
@spec await_ready(pid(), pos_integer()) :: :ok | {:error, term()}
Waits for the protocol session to become ready.
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec close(pid()) :: :ok
Stops the protocol session.
Returns protocol-session information.
Interrupts the underlying channel.
Sends an outbound protocol notification.
Sends an outbound protocol request and waits for the correlated reply.
Starts an unlinked protocol session.
@spec start_link(keyword()) :: GenServer.on_start()
Starts a linked protocol session.