aboutsummaryrefslogtreecommitdiff
path: root/trunk/examples/ivyprobe.ml
diff options
context:
space:
mode:
authorhattenberger2013-05-01 22:48:44 +0000
committerhattenberger2013-05-01 22:48:44 +0000
commitd567e908db2e1acec01d0798bd7e8af6c084dba4 (patch)
tree6b6eb46c9ea53360eda9127e54efb22acd857bbe /trunk/examples/ivyprobe.ml
parent7fae936e59d5c4a446e0c1e92e6d2df4fac5c37d (diff)
downloadivy-ocaml-d567e908db2e1acec01d0798bd7e8af6c084dba4.zip
ivy-ocaml-d567e908db2e1acec01d0798bd7e8af6c084dba4.tar.gz
ivy-ocaml-d567e908db2e1acec01d0798bd7e8af6c084dba4.tar.bz2
ivy-ocaml-d567e908db2e1acec01d0798bd7e8af6c084dba4.tar.xz
remove accidental trunk dir
Diffstat (limited to 'trunk/examples/ivyprobe.ml')
-rw-r--r--trunk/examples/ivyprobe.ml40
1 files changed, 0 insertions, 40 deletions
diff --git a/trunk/examples/ivyprobe.ml b/trunk/examples/ivyprobe.ml
deleted file mode 100644
index 47bd2aa..0000000
--- a/trunk/examples/ivyprobe.ml
+++ /dev/null
@@ -1,40 +0,0 @@
-(* $Id$ *)
-
-let print_message app message =
- Printf.printf "%s sent" (Ivy.name_of_client app);
- Array.iter (fun s -> Printf.printf " '%s'" s) message;
- print_newline ()
-
-let read = fun channel ->
- let l = input_line channel in
- Ivy.send l
-
-let watch_clients c e =
- let dis = match e with Ivy.Connected -> "" | Ivy.Disconnected -> "dis" in
- Printf.printf "%s %sconnected from %s\n"
- (Ivy.name_of_client c)
- dis
- (Ivy.host_of_client c);
- flush stdout
-
-let init = fun () ->
- let regexp = ref ""
- and name = ref "MLIVYPROBE"
- and port = ref 2010
- and domain = ref "127.255.255.255" in
- Arg.parse
- [ "-b", Arg.Int (fun x -> port := x), "<Port number>\tDefault is 2010, unused if IVYBUS is set";
- "-domain", Arg.String (fun x -> domain := x), "<Network address>\tDefault is 127.255.255.255, unused if IVYBUS is set";
- "-n", Arg.String (fun s -> name := s), "<Name of the prober>\tDefault is MLIVYPROBE"]
- (fun s -> regexp := s)
- "Usage: ";
-
- let bus =
- try Sys.getenv "IVYBUS" with
- Not_found -> Printf.sprintf "%s:%d" !domain !port in
- Ivy.init !name "READY" watch_clients;
- Ivy.start bus;
-
- Printf.printf "\nEnd of file to stop\n\n"; flush stdout;
-
- ignore (Ivy.bind print_message !regexp)