MCPcopy Index your code
hub / github.com/code100x/chess / broadcast

Method broadcast

apps/ws/src/SocketManager.ts:48–58  ·  view source on GitHub ↗
(roomId: string, message: string)

Source from the content-addressed store, hash-verified

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);

Callers 4

updateSecondPlayerMethod · 0.80
makeMoveMethod · 0.80
endGameMethod · 0.80
addHandlerMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected