Manager class

Manager constructor.

@param {String} engine instance or engine uri/opts @param {Object} options @api public

Inheritance

Constructors

Manager({dynamic uri, Map? options})

Properties

autoConnect bool
getter/setter pair
backoff ↔ _Backoff?
getter/setter pair
connecting List
getter/setter pair
decoder Decoder
getter/setter pair
encoder Encoder
getter/setter pair
encoding bool
getter/setter pair
engine Socket
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
lastPing num?
getter/setter pair
nsps Map<String, Socket>
getter/setter pair
options Map
getter/setter pair
packetBuffer List
getter/setter pair
randomizationFactor num
getter/setter pair
readyState String
getter/setter pair
reconnecting bool
getter/setter pair
reconnectionDelayMax num
Sets the maximum delay between reconnections.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
skipReconnect bool
getter/setter pair
subs List
getter/setter pair
timeout num?
Sets the connection timeout. false to disable
getter/setter pair
uri String
getter/setter pair

Methods

cleanup() → void
Clean up transport subscriptions and packet buffer.
clearListeners() → void
This function unbinds all the handlers for all the events.
inherited
close() → void
Close the current socket.
connect({dynamic callback, Map opts = emptyMap}) Manager
destroy(dynamic socket) → void
Called upon a socket close.
disconnect() → void
emit(String event, [dynamic data]) → void
This function triggers all the handlers currently listening to event and passes them data.
inherited
emitAll(String event, [dynamic data]) → void
Propagate given event to sockets and emit on this
generateId(String nsp) String
generate socket.id for the given nsp
hasListeners(String event) bool
Returns whether the event has registered.
inherited
maybeReconnectOnOpen() → void
Starts trying to reconnect if reconnection is enabled and we have not started reconnecting yet
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
off(String event, [EventHandler? handler]) → void
This function attempts to unbind the handler from the event
inherited
on(String event, EventHandler handler) → void
This function binds the handler as a listener to the event
inherited
once(String event, EventHandler handler) → void
This function binds the handler as a listener to the first occurrence of the event. When handler is called once, it is removed.
inherited
onclose(dynamic error) → void
Called upon engine close.
ondata(dynamic data) → void
Called with data.
ondecoded(dynamic packet) → void
Called when parser fully decodes a packet.
onerror(dynamic err) → void
Called upon socket error.
onopen([dynamic _]) → void
Called upon transport open.
onping([dynamic _]) → void
Called upon a ping.
onpong([dynamic _]) → void
Called upon a packet.
onreconnect() → void
Called upon successful reconnect.
open({dynamic callback, Map opts = emptyMap}) Manager
Sets the current transport socket.
packet(Map packet) → void
Writes a packet.
processPacketQueue() → void
If packet buffer is non-empty, begins encoding the next packet in line.
reconnect() Manager
Attempt a reconnection.
socket(String nsp, Map opts) Socket
Creates a socket for the given nsp.
toString() String
A string representation of this object.
inherited
updateSocketIds() → void
Update socket.id of all sockets

Operators

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