You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
644 B

2 years ago
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,
MOVE_CANVAS: 17,
2 years ago
STROKE: 20,
UNDO: 30,
REDO: 31,
2 years ago
IMAGE: 40,
IMAGE_MOVE: 41,
2 years ago
ERASER: 50,
2 years ago
});
export const MESSAGE = Object.freeze({
INIT: 100,
SYN: 101,
ACK: 102,
FULL: 103,
FIRE: 104,
JOIN: 105,
FOLLOW: 106,
});