Server authority
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
// messages between server/main.ts (the host) and the game server worker
|
||||
|
||||
export type HostToGame =
|
||||
| { type: "init"; save: string | undefined; default_seed: string }
|
||||
| { type: "connect"; conn: number }
|
||||
| { type: "message"; conn: number; data: string }
|
||||
| { type: "disconnect"; conn: number }
|
||||
// save now and say when it's done, for shutting down
|
||||
| { type: "shutdown" };
|
||||
|
||||
export type GameToHost =
|
||||
| { type: "ready"; seed: string }
|
||||
| { type: "send"; conn: number; data: string }
|
||||
| { type: "close"; conn: number }
|
||||
| { type: "save"; data: string; final: boolean };
|
||||
Reference in New Issue
Block a user