WebSocketReplayFixture class

Describes a set of server-side messages to replay for a given URL pattern.

Annotations

Constructors

WebSocketReplayFixture({required String urlPattern, required List<String> serverMessages, int connectDelayMs = 0, int messageIntervalMs = 10, int? closeCode, String? closeReason})
const

Properties

closeCode → int?
If non-null, the fake socket will close with this code after all messages.
final
closeReason → String?
Close reason accompanying closeCode.
final
connectDelayMs → int
Milliseconds to wait before the socket reports "connected" (simulates network latency).
final
hashCode → int
The hash code for this object.
no setterinherited
messageIntervalMs → int
Milliseconds between each replayed server message.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
serverMessages → List<String>
Ordered list of text messages the fake server will send after connection.
final
urlPattern → String
A regex pattern matched against the WebSocket URL.
final

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