(* Talk to an mmm master *)
open Unix

let main () =
 let file = 
   Filename.concat (Filename.concat (Sys.getenv "HOME") ".mmm")
		   "remote" in

  let socket = socket PF_UNIX SOCK_STREAM 0 in
  connect socket (ADDR_UNIX file);
  Arg.parse []
    (fun s -> write socket s 0 (String.length s);
              write socket "\n" 0 1; ())
    "Usage: mmm_remote <url>"

let _ = Printexc.catch main ()
