onDisconnect
abstract fun onDisconnect(isPermanent: Boolean, errorMessage: String? = null, reason: TransportDisconnectReason? = null)(source)
Called when the transport has disconnected.
Parameters
isPermanent
true when the current connection attempt should stop retrying (e.g. user disconnect, permission denied, max retries exhausted), false when it may come back (e.g. BLE range, TCP transient).
errorMessage
optional user-facing error message describing the disconnect reason.
reason
optional structured reason when the transport can classify the disconnect without owning user-facing text.