Source

dumbstreaming / dumbstreaming_io.mli

Full commit
open Ds_types;

module Make (IO : IO_Type)
 :
  sig

    exception Dumbstreaming of string
    ;

    (* proto ver1 *)
    value write1 : IO.output_channel -> string -> IO.m unit
    ;

    (* proto ver2 *)
    value write : IO.output_channel -> list string -> IO.m unit
    ;

    (* sends "end of stream", closes channel *)
    value close_out : IO.output_channel -> IO.m unit
    ;

    (* on "end of stream" returns None, closes channel *)
    value read : IO.input_channel -> IO.m (option string)
    ;

  end
;


value to_string : list string -> string
;