Echo<ClientType, ChannelType> class

This class is the primary API for interacting with broadcasting.

Implementers

Constructors

Echo(Connector<ClientType, ChannelType> connector)
Create a class instance.

Properties

connector Connector<ClientType, ChannelType>
The broadcasting connector.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
socketId String?
Get the Socket ID for the connection.
no setter

Methods

channel(String channel) Channel
Get a channel instance by name.
connect() → void
Create a connection.
disconnect() → void
Disconnect from the Echo server.
encryptedPrivate(String channel) Channel?
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
presence(String channel) PresenceChannel
Get a presence channel instance by name.
private(String channel) PrivateChannel
Get a private channel instance by name.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

pusher(String appKey, {required String authEndPoint, Map<String, String> authHeaders = const {'Content-Type' : 'application/json'}, String? cluster, String host = "ws.pusherapp.com", int wsPort = 80, int wssPort = 443, bool encrypted = true, int activityTimeout = 120000, int pongTimeout = 30000, int maxReconnectionAttempts = 6, int maxReconnectGapInSeconds = 30, bool enableLogging = true, bool autoConnect = true, String? nameSpace}) Echo<PusherClient, PusherChannel>
Init Echo with Pusher client
socket(String host, {String? namespace, bool autoConnect = true, Map<String, String> authHeaders = const {'Content-Type' : 'application/json'}, Map moreOptions = const {}}) Echo<Socket, SocketIoChannel>
Init Echo with Socket client