logging
This commit is contained in:
parent
30b76c5ff6
commit
c381b90f39
|
|
@ -8,6 +8,7 @@ import { send } from "./websocket"
|
||||||
import { setState } from "./state"
|
import { setState } from "./state"
|
||||||
|
|
||||||
export async function dispatchMessage(ws: any, msg: Message) {
|
export async function dispatchMessage(ws: any, msg: Message) {
|
||||||
|
console.log("<- receive", msg)
|
||||||
switch (msg.type) {
|
switch (msg.type) {
|
||||||
case "input":
|
case "input":
|
||||||
await inputMessage(ws, msg); break
|
await inputMessage(ws, msg); break
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import type { Message } from "./shared/types"
|
||||||
const wsConnections: any[] = []
|
const wsConnections: any[] = []
|
||||||
|
|
||||||
export function send(ws: any, msg: Message) {
|
export function send(ws: any, msg: Message) {
|
||||||
|
console.log("-> send", msg)
|
||||||
ws.send(JSON.stringify(msg))
|
ws.send(JSON.stringify(msg))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user