src_backend/socket.js
/**
 * updates the correct cursor at roomId to the new position, and broadcasts this change to all other users in the room
 * @param {SocketIO.Socket} socket socket server connection
 * @param {string} roomId the roomId
 * @param {string} color the cursor color
 */
updates the correct cursor at roomId to the new position, and broadcasts this change to all other users in the room
@param {SocketIO.Socket} socket socket server connection
@param {string} roomId the roomId
@param {string} color the cursor color
updates the correct cursor at roomId to the new position and broadcasts this change to all other users in the room @param { SocketIO . Socket } socket socket server connection @param { string } roomId the roomId @param { string } color the cursor color
function broadcastRemoveCursorHandler (socket, roomId, color) {
    if (isInvalidRoomId(roomId)) {
      console.error(
        `attempted broadcast of invalid room: 
        ${roomId}`
      )
      socket.disconnect(true)
    } else {
      socket.broadcast.to(roomId).emit('remove cursor', { color })
    }
  }
function broadcastRemoveCursorHandler ( socket , roomId , color ) { if ( isInvalidRoomId ( roomId ) ) { console . error ( ` ${ roomId } ` ) socket . disconnect ( true ) } else { socket . broadcast . to ( roomId ) . emit ( 'remove cursor' , { color } ) } }
updates the correct cursor at roomId to the new position, and broadcasts this change to all other users in the room
 @param {SocketIO.Socket} socket socket server connection
 @param {string} roomId the roomId
 @param {string} color the cursor color
updates the correct cursor at roomId to the new position and broadcasts this change to all other users in the room @param { SocketIO . Socket } socket socket server connection @param { string } roomId the roomId @param { string } color the cursor color