This commit is contained in:
Seth 2025-05-22 17:57:43 -04:00
parent 784c1c1c56
commit a341bdde08
5 changed files with 17 additions and 132 deletions

View file

@ -85,8 +85,16 @@ const server = serve({
);
},
message: (ws, msg: string) => {
if (msg === "ping") ws.send("pong", true);
if (msg === "pong") ws.send("ping", true);
switch (msg) {
case "ping":
ws.send("pong", true);
break;
case "pong":
ws.send("ping", true);
break;
default:
break;
}
return;
},