2022-12-11 18:58:56 +01:00
|
|
|
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
|
2022-12-26 02:06:13 +01:00
|
|
|
|
|
|
|
|
type server_message =
|
|
|
|
|
| Full_state of State.t
|
|
|
|
|
| Update_result of (State.action', string) result
|
|
|
|
|
|
|
|
|
|
type client_message = Action_msg of State.action
|