TestWsConnection class
The test side of an in-memory WebSocket session (see NitroTestClient.ws). Messages from the route handler arrive on messages; sendText and sendBytes deliver to the handler; close ends the session like a peer close; closedCode completes with the handler side's close code.
Properties
-
closedCode
→ Future<
int> -
The handler side's close code once closed (either direction).
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
messages
→ Stream<
WsMessage> -
Messages sent by the route handler.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
[int code = 1000]) → Future< void> - Closes like a peer close, then waits for the handler side to reap.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendBytes(
Uint8List bytes) → void - Delivers a binary message to the handler.
-
sendText(
String text) → void - Delivers a text message to the handler.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited