Echo class
This class is the primary API for interacting with broadcasting.
Constructors
-
Echo({EchoBroadcasterType broadcaster = EchoBroadcasterType.Pusher, required dynamic client, Map<
String, dynamic> ? options}) - Create a new class instance.
Properties
- broadcaster ↔ EchoBroadcasterType
-
getter/setter pair
- connector ↔ dynamic
-
The broadcasting connector.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
-
options
↔ Map<
String, dynamic> -
The Echo options.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
channel(
String channel) → Channel - Get a channel instance by name.
-
connect(
) → void - Create a new connection.
-
disconnect(
) → void - Disconnect from the Echo server.
-
encryptedPrivate(
String channel) → PrivateChannel - Get a private encrypted channel instance by name.
-
join(
String channel) → PresenceChannel - Get a presence channel instance by name.
-
leave(
String channel) → void - Leave the given channel, as well as its private and presence variants.
-
leaveChannel(
String channel) → void - Leave the given channel.
-
listen(
String channel, String event, Function callback) → Channel - Listen for an event on a channel instance.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
private(
String channel) → PrivateChannel - Get a private channel instance by name.
-
socketId(
) → String? - Get the Socket ID for the connection.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited