do not send whole state on action

This commit is contained in:
Swrup 2022-12-26 02:06:13 +01:00
parent 86489c5394
commit 53a4ae536d
6 changed files with 135 additions and 66 deletions

View file

@ -3,3 +3,9 @@ let marshal o = Marshal.to_string o [] |> Format.sprintf "%S"
let unmarshal o =
let s = Scanf.sscanf o "%S" (fun s -> s) in
Marshal.from_string s 0
type server_message =
| Full_state of State.t
| Update_result of (State.action', string) result
type client_message = Action_msg of State.action