SocketTransport class abstract interface

The socket a hub talks through.

Everything the hub needs from a connection is behind this interface, so a test can drive the hub with FakeTransport from package:socket_hub/socket_hub_testing.dart instead of a server, and mock mode can feed it generated data.

Implementers

Properties

hashCode → int
The hash code for this object.
no setterinherited
incoming → Stream
Frames arriving from the far end, exactly as the socket delivers them — usually String, sometimes List<int>.
no setter
ready → Future<void>
Completes when the socket is open, or with an error if it never opens.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → Future<void>
Closes the socket. Must complete even if it was never open.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send(Object data) → void
Sends one frame. Called only after ready completes.
toString() → String
A string representation of this object.
inherited

Operators

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