Class: Room

Room


new Room(room_token)

Represents room with sketch

Parameters:
Name Type Description
room_token string

room name

Members


sketchpad

Sketchpad that contain this room


room_token :string

Token of current room

Type:
  • string

sketches :Sketch

Sketch in room

Type:

clients :Array

List of connected users

Type:
  • Array

Methods


addClient(user)

[addClient description]

Parameters:
Name Type Description
user object

new user that entered the room


updateClient(updatedUser)

Update information about user

Parameters:
Name Type Description
updatedUser object

{user_id: number, updated values...}


removeClientById(user_id)

[removeClientById description]

Parameters:
Name Type Description
user_id number

user id to be removed