RelayApi class abstract
An abstract class that defines the API for interacting with a relay service.
Constructors
Properties
Methods
-
close(
) → void - Closes the WebSocket connection to the relay.
-
connect(
) → Future< Stream< Message> > - Connects to the relay server and returns a stream of Message objects.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
on(
dynamic callback(RelayEvent)) → void -
Sets a callback function to be called when events occur on the relay.
The
callback
function should take a single argument of type RelayEvent. -
publish(
Event event) → void - Publishes an event to the relay.
-
sub(
List< Filter> filters) → void -
Subscribes to a set of filters on the relay. Only events that match the filters
will be received. The
filters
argument is a list of Filter objects. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited