SocketStorage class
Constructors
- SocketStorage()
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addWebSocketIdToRoom(
String socketId, String roomId) → void - add socket Id to the room this is use to join the room
-
addWebSocketInfo(
String socketId, WebSocket ws) → void - add new websocket to active connections this is used when new ws connection is connected
-
getWebSocketIdsOfTheRoom(
String roomId) → List< String> - get list of socket id from the room this is used when we want to emit message to specific room
-
getWebSocketInfo(
String socketId) → WebSocketInfo? - get web socket info of socket Id this is used to get websocket info
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeWebSocketIdFromRoom(
String socketId, String? roomId) → void - remove websocketId from the room this is used when user leave the room
-
removeWebSocketInfo(
String socketId) → void - remove connection by socketId this is used when user leave or disconnected or on error first remove from the room and then remove from connection
-
toString(
) → String -
A string representation of this object.
inherited
-
updateActiveRoomId(
String socketId, String roomId) → void - update websocket active room id this is used when user join new room this remove previous room and set new room
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited