Latest recorded provider resumption handle, or null if none.
True while any connection-duration timer (soft, hard, or the deferred hard move's last call) is armed.
True once Dispose() has been called.
True when inside the proactive soft reconnect window or after a ConnectionEnding notice.
True once a session that previously held a native resumption handle (or non-empty history) fell back to text seeding on a reconnect, latching subsequent reconnects in this call to seed mode so pre-fallback history is never lost.
True from the start of a reconnect cycle until it succeeds or fails, including while a planned move waits between
attempts with the call live again on its old connection (when IsReconnecting reads false). A driver
checks it to hand a loss of that old connection to the running cycle instead of treating it as the end of the call.
True while an in-place reconnect cycle is running, except while a planned move waits between attempts with the call live again on its old connection (see RealtimeReconnectControllerOptions.ReturnToOldConnection).
True while a turn has started and not yet ended.
Arms (or re-arms) the proactive soft and hard duration timers for the active connection.
Re-arming mid-connection (for example when a dynamic video cap engages or clears) measures
remaining time against when the current connection opened and preserves any active
ConnectionEnding (goAway) deadline.
OptionalconnectionDeadlineAtMs: numberWhen the provider ends this connection regardless of its duration limit (epoch ms), such as the expiry of the credential a Gemini connection opened on. The earlier of the two is the limit the soft window, the hard point and the hard move's last call measure from.
Cancels any pending credential refresh timer.
Handles a provider connection-ending notice (goAway / session.going_away).
Reconnects immediately if idle and ready; otherwise waits for the turn/handle boundary up to
timeLeftMs - margin (where margin = clamp(round(timeLeftMs / 3), 1500, 10000)).
OptionaltimeLeftMs: numberCancels all timers, abandons any in-flight attempt, and prevents further reconnects.
Clears the stored resumption handle so subsequent reconnects use history seeding.
Re-evaluates whether a queued soft-window or ConnectionEnding reconnect can proceed now that
a turn or tool batch has finished.
The host reports the network is back (a browser online event): a reconnect waiting out a retry delay starts its
next attempt now instead of at the end of the delay. Does nothing when no retry is waiting.
Records a provider resumption handle and whether the provider marked this point resumable.
Resets disposed/exhausted state and clears timers so a reused session/client instance can arm fresh timers.
Schedules a proactive credential or relay-session refresh before expiresAtIso (or
fallbackLifetimeSeconds), independent of connection reconnects.
OptionalfallbackLifetimeSeconds: numberRecords that a tool result was sent on the active connection.
When expectsReply is true (non-silent tool result), a soft-window or ConnectionEnding
move waits for the model's post-tool turn (or a fresh trusted native handle that captures
the tool output) rather than reconnecting in the gap between SendToolResult and the first
model output frame.
Initiates an in-place reconnect with coalescing, rapid-reconnect circuit breaker, per-attempt
timeout + Abandoned cancellation, and Attempt-2 fallback from native handle to memory seed.
Marks a turn as ended and triggers any queued soft-window or ConnectionEnding move when ready.
Marks a turn as open so soft-window and ConnectionEnding moves wait for the turn boundary, and a hard-point move
waits for it until shortly before the provider limit.
Single I/O-free reconnect orchestrator shared by BaseRealtimeSession and
BaseRealtimeClient.Unifies:
RecordHandle,InvalidateHandle) with post-turn handle awareness,ScheduleCredentialRefresh),ConnectionEnding(timeLeftMs)notice (goAway/session.going_away) with scaled1/3margin,TriggerReconnect('connection-lost')trigger,Abandoned+AbortSignalcancellation, and Attempt-2 automatic fallback from native handle toRealtimeConversationMemoryseed,reconnect-loop-breaker).