Socket class
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
-