* Returns the rooms the socket is currently in. * * @example * io.on("connection", (socket) => { * console.log(socket.rooms); // Set { <socket.id> } * * socket.join("room1"); * * console.log(socket.rooms); // Set { <socket.id>, "room1" } * });
()
| 932 | * }); |
| 933 | */ |
| 934 | public get rooms(): Set<Room> { |
| 935 | return this.adapter.socketRooms(this.id) || new Set(); |
| 936 | } |
| 937 | |
| 938 | /** |
| 939 | * Adds a listener that will be fired when any event is received. The event name is passed as the first argument to |
nothing calls this directly
no test coverage detected