refractor websocket again

This commit is contained in:
ading2210 2024-03-06 15:53:11 -05:00
parent c681e21777
commit c9236f90d5
9 changed files with 233 additions and 208 deletions

View file

@ -0,0 +1,18 @@
function logger(type, text) {
if (type === "log")
console.log(text);
else if (type === "warn")
console.warn(text);
else if (type === "error")
console.error(text);
}
function log_msg(text) {
logger("log", text);
}
function warn_msg(text) {
logger("warn", text);
}
function error_msg(text) {
logger("error", text);
}