SocketIoChannel class
This class represents a Socket.io channel.
- Inheritance
- Implementers
Constructors
- SocketIoChannel(Socket socket, String name, ConnectorOptions options)
- Create a new class instance.
Properties
-
events
→ Map<
String, dynamic> -
The event callbacks applied to the socket.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
listeners
→ Map<
String, List> -
User supplied callbacks for events on this channel
final
- name → String
-
The name of the channel.
final
- options → ConnectorOptions
-
The Echo options.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- socket → Socket
-
The Socket.io client instance.
final
Methods
-
error(
Function callback) → SocketIoChannel -
Register a callback to be called anytime an error occurs.
override
-
listen(
String event, Function callback) → SocketIoChannel -
Listen for an event on the channel instance.
override
-
listenForWhisper(
String event, Function callback) → Channel -
Listen for a whisper event on the channel instance.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notification(
Function callback) → Channel -
Listen for an event on the channel instance.
inherited
-
on(
String event, Function callback) → SocketIoChannel - Bind the channel's socket to an event and store the callback.
-
stopListening(
String event, [Function? callback]) → SocketIoChannel -
Stop listening for an event on the channel instance.
override
-
stopListeningForWhisper(
String event, [Function? callback]) → Channel -
Stop listening for a whisper event on the channel instance.
inherited
-
subscribe(
) → void -
Subscribe to a Socket.io channel.
override
-
subscribed(
Function callback) → SocketIoChannel -
Register a callback to be called anytime a subscription succeeds.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
unbind(
) → void - Unbind the channel's socket from all stored event callbacks.
-
unsubscribe(
) → void -
Unsubscribe from channel and unbind event callbacks.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited