Socket class

Inheritance

Constructors

Socket(Namespace nsp, Client client, dynamic query)

Properties

acks Map
getter/setter pair
adapter Adapter
getter/setter pair
broadcast Socket
no setter
client Client
getter/setter pair
conn ↔ dynamic
getter/setter pair
connected bool
getter/setter pair
data Map
getter/setter pair
disconnected bool
getter/setter pair
flags Map<String, bool>?
getter/setter pair
handshake Map?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id String
getter/setter pair
json Socket
no setter
nsp Namespace
getter/setter pair
request HttpRequest
getter/setter pair
roomList List
getter/setter pair
roomMap Map
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
server ServerIO
getter/setter pair
volatile Socket
no setter

Methods

ack(dynamic id) Function
Produces an ack callback to emit with an event.
buildHandshake(dynamic query) Map
clearListeners() → void
inherited
compress(dynamic compress) Socket
Sets the compress flag.
disconnect([dynamic close]) Socket
Disconnects this client.
emit(String event, [dynamic data]) → void
override
emitWithAck(String event, dynamic data, {Function? ack, bool binary = false}) → void
emitWithBinary(String event, [dynamic data]) → void
error(dynamic err) → void
Produces an error packet.
hasListeners(String event) bool
inherited
join(dynamic room, [dynamic fn]) Socket
Joins a room.
leave(dynamic room, dynamic fn) Socket
Leaves a room.
leaveAll() → void
Leave all rooms.
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
onAck(dynamic packet) → void
Called upon ack packet.
once(String event, EventHandler handler) → void
inherited
onClose([dynamic reason]) → dynamic
Called upon closing. Called by Client.
onconnect() → void
Called by Namespace upon succesful middleware execution (ie: authorization).
onDisconnect() → void
Called upon client disconnect packet.
onError(dynamic err) → void
Handles a client error.
onEvent(dynamic packet) → void
Called upon event packet.
onPacket(dynamic packet) → void
Called with each packet. Called by Client.
packet(dynamic packet, [dynamic opts]) → void
Writes a packet.
send(dynamic _) → void
Sends a message event.
to(String name) Socket
Targets a room when broadcasting.
toString() String
A string representation of this object.
inherited
write(List data) Socket

Operators

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