Module Mlchat


module Mlchat: sig  end
The MLChat library. You can use it to add chat in your apps.

type port = int 
type host = string 
type id = string 


Configuration


class type config = object  end
The type of the class to use as the st of options.
class file_config : string -> config
Create a config object from a config file name.


Communication


type address = host * port 
type message = string 
type version 
type source = version * id * address 

type proto =
| Hello
| HelloOk
| Byebye
| Message of message
| AddOpen of (id * address)
| RoomMessage of (id * (id * host * port) list * message)
| File of (int * string)
type info = source * id * proto 
val version : unit -> version
val read_info : Buffer.t -> info
Read a info from the given buffer.
val read_info_channel : Pervasives.in_channel -> info
Read a info from the given channel.
val write_info : Buffer.t -> info -> unit
Write the given info to the given buffer.
val write_info_channel : Pervasives.out_channel -> info -> unit
Write the given info to the given channel.