summaryrefslogtreecommitdiff
path: root/src/proto.ml
blob: f0517d497cabbc9a2ba06514b2100139c62d3638 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
open Util

(* Protocol definitions *)

type task = unit -> unit
type msg_task = string -> unit
type task_descr = string
type msg_task_descr = string

exception ProtocolError of string

type message =
	| Hello
	| Get of id * msg_task_descr
	| Put of id * string
	| RequestTask
	| GiveTask of task_descr * bool
	| GiveMsgTask of string * msg_task_descr
	| FinalResult of string