X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=ircml.git;a=blobdiff_plain;f=connection.mli;fp=connection.mli;h=5da8eda8923ec8c2f3a0838e90dab1c3f9cf0977;hp=0000000000000000000000000000000000000000;hb=41ed4cf0af1eab1c7b14246f8e1e09fd7b8f3ac9;hpb=269a81852a0c30b83f32eb997de5483558eaafc2 diff --git a/connection.mli b/connection.mli new file mode 100644 index 0000000..5da8eda --- /dev/null +++ b/connection.mli @@ -0,0 +1,28 @@ +(* -*- mode: tuareg -*- ******************************************************) +(* *) +(* Written by and (c) Francois Fleuret, 2002 *) +(* Contact for info and bug reports *) +(* *) +(* This program is free software; you can redistribute it and/or modify *) +(* it under the terms of the GNU General Public License as published by *) +(* the Free Software Foundation. See the file LICENSE for more details. *) +(* *) +(*****************************************************************************) + +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)