ConnectionInfo class

Runtime record of an MCP connection attempt and its current state.

Mutable on purpose: ConnectionManager updates state, client, connectedAt, and error in place and notifies listeners, matching the original basic/ behavior.

Constructors

ConnectionInfo({required String serverId, required String serverName, required ServerConfig serverConfig, required ConnectionState state, Client? client, DateTime? connectedAt, String? error})

Properties

awaitsReachability ↔ bool
The last connect failed with an AwaitsReachability error: the endpoint is known to be absent and something will say when it is back. Retrying on a timer cannot succeed sooner, so the health monitor backs off even for an app on screen and waits for a reachability hint (FR-HEALTH-011).
getter/setter pair
client ↔ Client?
getter/setter pair
connectedAt ↔ DateTime?
getter/setter pair
connectionDuration → Duration?
no setter
disconnectSub ↔ StreamSubscription<DisconnectReason>?
Subscription to the client's onDisconnect stream. Held so the manager can react to a transport that drops on its own (BLE supervision timeout, server close) and can cancel the listener on an explicit disconnect.
getter/setter pair
error ↔ String?
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
isHealthy → bool
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
serverConfig → ServerConfig
final
serverId → String
final
serverName → String
final
state ↔ ConnectionState
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited