This is client API (go to server)

Warning: Reason support is experimental. We are looking for beta-tester and contributors.

Module Eliom_comet

module Eliom_comet : sig..end

Handle unsolicited server to client communications.


exception Channel_full

when the page is not active the client stops making comet requests to the server, implying that the client can't be notified by the server anymore. The activity status is changed when the page is focused or unfocused.

To stop receiving inputs from a channel, use Lwt.cancel on a thread waiting for datas. For instance, if you iterate with let t = Lwt_stream.iter f %channel calling Lwt.cancel t will close the channel.

exception Process_closed

Channel_full is raised when trying to read on a channel marked full by the server. It is not possible to read anything else from a full channel.

exception Channel_closed

Process_closed is raised when reading on a channel and the server side of the application closed the client process. This apply only to statefull channels

val is_active : unit -> bool

Process_closed is raised when reading on a channel and the server side of the application closed channel ( the channel was garbage collected ). This apply only to stateless channels

val activate : unit -> unit

is_active () returns the current activity state


if the client is inactive activate () launch a new xhr connection to start receiving server messages

module Configuration : sig..end

Change the reactivity of channels.

module Channels : sig..end

after set_time_between_request t v, the main loop will wait for v seconds between two requests.