ServerInitiated class final

A disconnection that was initiated by the server.

This source indicates that the server closed the WebSocket connection, either gracefully or due to an error condition. The optional error provides additional context about the disconnection cause.

Inheritance
Available extensions

Constructors

ServerInitiated({StreamException? error, StackTrace? stackTrace})
Creates a ServerInitiated disconnection source.
const

Properties

cause → StreamException?

Available on DisconnectionSource, provided by the DisconnectionSourceReads extension

What closed the connection, or null when this source carries no cause.
no setter
closeReason → String

Available on DisconnectionSource, provided by the DisconnectionSourceReads extension

Why the connection closed, in a form fit for a log.
no setter
error → StreamException?
The error that caused the server to close the connection.
final
exception → StreamException

Available on DisconnectionSource, provided by the DisconnectionSourceReads extension

The exception this disconnection is reported as.
no setter
hashCode → int
The hash code for this object.
no setterinherited
isReconnectable → bool

Available on DisconnectionSource, provided by the DisconnectionSourceReads extension

Whether a connection closed for this reason is worth opening again.
no setter
props → List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stackTrace → StackTrace?
Where error was raised, when it was raised rather than read off the wire.
final
stackTrace → StackTrace?

Available on DisconnectionSource, provided by the DisconnectionSourceReads extension

The stack trace of the failure that closed the connection, or null when it closed without one.
no setter
stringify → bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

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

Operators

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