1 (* -*- mode: tuareg -*- ******************************************************)
3 (* Written by and (c) Francois Fleuret, 2002 *)
4 (* Contact <francois.fleuret@inria.fr> for info and bug reports *)
6 (* This program is free software; you can redistribute it and/or modify *)
7 (* it under the terms of the GNU General Public License as published by *)
8 (* the Free Software Foundation. See the file LICENSE for more details. *)
10 (*****************************************************************************)
12 exception Network_error of string
14 val bytes_of_int : int -> string
15 val int_of_bytes : string -> int
16 val dot_to_number : string -> string
17 val connect : string -> int -> Unix.file_descr
18 val listen : int -> Unix.file_descr
20 (* (linizer fd reader) is a function that, when called, applies the
21 reader to each available line (individually) from fd *)
22 val linizer : Unix.file_descr -> (string -> unit) -> (unit -> unit)
24 (* Same, but instead of being applied to each line individually, it
25 will be applied to all available bytes at all *)
26 val binarizer : Unix.file_descr -> (string -> unit) -> (unit -> unit)
28 val tokenizer: string -> char -> (unit -> string) * (unit -> string)