GameClient class

Inheritance

Constructors

GameClient(GameNamespace _namespace, ServerClient _parent)

Properties

hashCode int
The hash code for this object.
no setterinherited
id SocketId
no setter
ipAddress String
The numeric address of the host.
no setter
isConnected bool
no setter
joinedRooms Set<String>
no setter
namespace Namespace
no setter
readyState ReadyState
Returns the current state of the connection.
no setter
remoteAddress InternetAddress
The remote InternetAddress connected to by this socket.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statistic SocketStat
no setter

Methods

broadcast(Message message, [Set<String>? rooms, SocketId? exclude]) → void
Broadcasting message to rooms.
broadcastList(List<Message> list, String room, {SocketId? exclude}) → void
Broadcast a list of messages to a room.
broadcastRoomEvent(String event, String room, {SocketId? exclude, dynamic data}) → void
Broadcasting event to room.
disconnect(bool close, String reason) → void
Disconnect this socket. Optionally, close the underlying connection.
emit(String event, [dynamic data]) → void
inherited
except(String room) Namespace
Excludes a room when emitting.
getIdleTime() Duration
hasListeners(String event) bool
inherited
isJoinedInRoom(String room) bool
join(String room) → void
Joins a room.
joinTo(Set<String> rooms) → void
Joins a rooms.
leave(String room) → void
Leaves a room.
leaveAllRooms() → void
Removes the socket from all rooms.
leaveFrom(Set<String> rooms) → void
Leave all rooms.
listeners(String event) List<EventHandler>
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
off(String event, [EventHandler? handler]) → void
inherited
offAll() → void
inherited
on(String event, EventHandler handler) → void
inherited
once(String event, EventHandler handler) → void
inherited
onClose(String reason) → void
onConnect() → void
onDisconnect() → void
onError(String error) → void
onEvent(RoomPacket packet) → void
onPacket(Packet packet) → void
send(Message message) → void
Sending message to client.
sendRaw(List<int> data) → void
to(String room) Namespace
Targets a room when emitting.
toString() String
A string representation of this object.
override

Operators

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