Changed the email addresses to francois@fleuret.org, changed the Makefile header.
[ircml.git] / connection.mli
1
2 (*************************************************************************)
3 (* This program is free software: you can redistribute it and/or modify  *)
4 (* it under the terms of the version 3 of the GNU General Public License *)
5 (* as published by the Free Software Foundation.                         *)
6 (*                                                                       *)
7 (* This program is distributed in the hope that it will be useful, but   *)
8 (* WITHOUT ANY WARRANTY; without even the implied warranty of            *)
9 (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      *)
10 (* General Public License for more details.                              *)
11 (*                                                                       *)
12 (* You should have received a copy of the GNU General Public License     *)
13 (* along with this program. If not, see <http://www.gnu.org/licenses/>.  *)
14 (*                                                                       *)
15 (* Written and (C) by Francois Fleuret                                   *)
16 (* Contact <francois@fleuret.org> for comments & bug reports             *)
17 (*************************************************************************)
18
19 exception Network_error of string
20
21 val bytes_of_int : int -> string
22 val int_of_bytes : string -> int
23 val dot_to_number : string -> string
24 val connect : string -> int -> Unix.file_descr
25 val listen : int -> Unix.file_descr
26
27 (* (linizer fd reader) is a function that, when called, applies the
28    reader to each available line (individually) from fd *)
29 val linizer : Unix.file_descr -> (string -> unit) -> (unit -> unit)
30
31 (* Same, but instead of being applied to each line individually, it
32    will be applied to all available bytes at all *)
33 val binarizer : Unix.file_descr -> (string -> unit) -> (unit -> unit)
34
35 val tokenizer: string -> char -> (unit -> string) * (unit -> string)