summaryrefslogtreecommitdiff
path: root/src/proto.ml
diff options
context:
space:
mode:
Diffstat (limited to 'src/proto.ml')
-rw-r--r--src/proto.ml21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/proto.ml b/src/proto.ml
new file mode 100644
index 0000000..f0517d4
--- /dev/null
+++ b/src/proto.ml
@@ -0,0 +1,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
+
+