Socket class

Inheritance

Constructors

Socket(String id, Server server, Transport transport, SocketConnect connect)

Properties

checkIntervalTimer Timer?
getter/setter pair
cleanupFn List
getter/setter pair
connect SocketConnect
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id String
getter/setter pair
packetsFn List<Function>
getter/setter pair
pingTimeoutTimer Timer?
getter/setter pair
readyState String
getter/setter pair
remoteAddress InternetAddress
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sentCallbackFn List<Function>
getter/setter pair
server Server
getter/setter pair
transport Transport
getter/setter pair
upgraded bool
getter/setter pair
upgradeTimeoutTimer Timer?
getter/setter pair
upgrading bool
getter/setter pair
writeBuffer List<Map>
getter/setter pair

Methods

clearListeners() → void
inherited
clearTransport() → void
Clears listeners and timers associated with current transport.
close([dynamic discard = false]) → void
Closes the socket and underlying transport.
closeTransport(dynamic discard) → void
Closes the underlying transport.
emit(String event, [dynamic data]) → void
inherited
flush() → void
Attempts to flush the packets buffer.
getAvailableUpgrades() List
Get available upgrades for this socket.
hasListeners(String event) bool
inherited
maybeUpgrade(dynamic transport) → void
Upgrades socket to the given transport
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
off(String event, [EventHandler? handler]) → void
inherited
on(String event, EventHandler handler) → void
inherited
once(String event, EventHandler handler) → void
inherited
onClose(dynamic reason, [dynamic description]) → void
Called upon transport considered closed. Possible reasons: ping timeout, client error, parse error, transport error, server close, transport close
onError(dynamic err) → void
Called upon transport error.
onOpen() → void
Called upon transport considered open.
onPacket(dynamic packet) → void
Called upon transport packet.
send(dynamic data, dynamic options, [dynamic callback]) → void
Sends a message packet.
sendPacket(dynamic type, {dynamic data, dynamic options, dynamic callback}) → void
Sends a packet.
setPingTimeout() → void
Sets and resets ping timeout timer based on client pings.
setTransport(Transport transport) → void
Attaches handlers for the given transport.
setupSendCallback() → void
Setup and manage send callback
toString() String
A string representation of this object.
inherited
write(dynamic data, dynamic options, [dynamic callback]) Socket

Operators

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