summaryrefslogblamecommitdiff
path: root/src/proto.ml
blob: 1f6d8e6791068cf19e8f8a1f505e65c149b10ea1 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13












                                 
                          







                                                






                                                      
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
	| Output of string
	| 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
	

(* Protocol for pooling *)

type pool_message =
	| PoolHello
	| PoolProvide of int
	| PoolRequest of string * (string * int) * int