(*************************************************************************)
(* This program is free software: you can redistribute it and/or modify *)
(* it under the terms of the version 3 of the GNU General Public License *)
(* as published by the Free Software Foundation. *)
(* *)
(* This program is distributed in the hope that it will be useful, but *)
(* WITHOUT ANY WARRANTY; without even the implied warranty of *)
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *)
(* General Public License for more details. *)
(* *)
(* You should have received a copy of the GNU General Public License *)
(* along with this program. If not, see . *)
(* *)
(* Written and (C) by Francois Fleuret *)
(* Contact for comments & bug reports *)
(*************************************************************************)
exception Network_error of string
val bytes_of_int : int -> string
val int_of_bytes : string -> int
val dot_to_number : string -> string
val connect : string -> int -> Unix.file_descr
val listen : int -> Unix.file_descr
(* (linizer fd reader) is a function that, when called, applies the
reader to each available line (individually) from fd *)
val linizer : Unix.file_descr -> (string -> unit) -> (unit -> unit)
(* Same, but instead of being applied to each line individually, it
will be applied to all available bytes at all *)
val binarizer : Unix.file_descr -> (string -> unit) -> (unit -> unit)
val tokenizer: string -> char -> (unit -> string) * (unit -> string)