Connector<ClientType, ChannelType> class
abstract
- Implementers
Constructors
-
Connector(ConnectorOptions<
ClientType> options) - Create a new class instance.
Properties
-
channels
↔ Map<
String, ChannelType> -
All of the subscribed channel names.
getter/setter pair
- client → ClientType
-
getting client
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
options
↔ ConnectorOptions<
ClientType> -
Connector options.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- socketId → String?
-
Get the socket_id of the connection.
no setter
Methods
-
channel(
String channel) → Channel - Get a channel instance by name.
-
connect(
) → void - Create a fresh connection.
-
disconnect(
) → void - Disconnect from the Echo server.
-
encryptedPrivateChannel(
String channel) → Channel? -
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 to channel event
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onConnect(
dynamic handler(dynamic data)) → void - listen to on connect event
-
onConnectError(
dynamic handler(dynamic data)) → void - listen to on connect error event
-
onConnecting(
dynamic handler(dynamic data)) → void - listen to on connecting event
-
onConnectTimeout(
dynamic handler(dynamic data)) → void - listen to on connect timeout event
-
onDisconnect(
dynamic handler(dynamic data)) → void - listen to on disconnect event
-
onError(
dynamic handler(dynamic data)) → void - listen to on error event
-
onReconnect(
dynamic handler(dynamic data)) → void - listen to on reconnected event
-
onReconnectAttempt(
dynamic handler(dynamic data)) → void - listen to on reconnect attempt event
-
onReconnectError(
dynamic handler(dynamic data)) → void - listen to on reconnect error event
-
onReconnectFailed(
dynamic handler(dynamic data)) → void - listen to on reconnect failed event
-
onReconnecting(
dynamic handler(dynamic data)) → void - listen to on reconnecting event
-
presenceChannel(
String channel) → PresenceChannel - Get a presence channel instance by name.
-
privateChannel(
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