(roomId: string, message: string)
| 46 | } |
| 47 | |
| 48 | broadcast(roomId: string, message: string) { |
| 49 | const users = this.interestedSockets.get(roomId); |
| 50 | if (!users) { |
| 51 | console.error('No users in room?'); |
| 52 | return; |
| 53 | } |
| 54 | |
| 55 | users.forEach((user) => { |
| 56 | user.socket.send(message); |
| 57 | }); |
| 58 | } |
| 59 | |
| 60 | removeUser(user: User) { |
| 61 | const roomId = this.userRoomMappping.get(user.userId); |
no outgoing calls
no test coverage detected