export const SESSION = Object.freeze({ OPENED: 0, // nothing sent/recved yet READY: 1, // init complete CLOSED: 2, // socket closed, but we might continute this same session on another socket }); export const EVENT = Object.freeze({ PREDRAW: 10, SET_COLOR: 11, SET_WIDTH: 12, CLEAR: 13, MOVE_CURSOR: 14, MOVE_SCREEN: 15, LEAVE: 16, STROKE: 20, UNDO: 30, REDO: 31, IMAGE: 40, IMAGE_MOVE: 41, ERASER: 50, }); export const MESSAGE = Object.freeze({ INIT: 100, SYN: 101, ACK: 102, FULL: 103, FIRE: 104, JOIN: 105, });