let connect _ r w =
let eval req =
Writer.write_marshal w req ~flags:[]
in
eval (Request.Succ 42);
eval (Request.Neg (-42));
eval (Request.Plus (40, 2));
eval (Request.Sub (44, 2));
eval (Request.Times (6, 7));
eval (Request.Eq (42, 42));
Reader.read_marshal r >>= fun res -> print_endline (or_else res "Eof");
Reader.read_marshal r >>= fun res -> print_endline (or_else res "Eof");
Reader.read_marshal r >>= fun res -> print_endline (or_else res "Eof");
Reader.read_marshal r >>= fun res -> print_endline (or_else res "Eof");
Reader.read_marshal r >>= fun res -> print_endline (or_else res "Eof");
Reader.read_marshal r >>| fun res -> print_endline (or_else res "Eof")