---
name: "Eliom_comet.Configuration.client"
section: "3o"
platform: "linux"
package: "libeliom-ocaml-doc"
version: "4.0.0-2"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/Eliom_comet.Configuration.client"
---

# Eliom\_comet.Configuration.client(3o)

Change the reactivity of channels.

## NAME

Eliom\_comet.Configuration - Change the reactivity of channels.

## Module

Module   Eliom\_comet.Configuration

## Documentation

Module **Configuration**\
  :  **sig end**

Change the reactivity of channels. Multiples configurations ( of type  **t** ) can be created. The resulting behaviour is the minimal ( in the meaning of maximal reactivity ) between all configurations

*type t*

*val new\_configuration* :  **unit -\> t**

Creates a new configuration with default value. It modifies the current behaviour immediately

*val drop\_configuration* :  **t -\> unit**

**drop\_configuration t** restores the behaviour to the minimum of configuration without  **t** . If there is no other configuration than  **t** , it is restored to the defaults.

*val set\_always\_active* :  **t -\> bool -\> unit**

**set\_always\_active c b** if b is true, tells the client to always stay active. Default value is false.

*val set\_timeout* :  **t -\> float -\> unit**

**set\_timeout c t** tells the client to stay active at least  **t** seconds when the application lose the focus. Default value is 180.

*val set\_active\_until\_timeout* :  **t -\> bool -\> unit**

**set\_active\_until\_timeout c v** sets the activity changing behaviour. if  **v** is  **true** the page is kept active even if not focused until the client receive a timeout message from the server. It implies that if the server keeps sending data to the client, the comet connection will never be closed. Default value is false.

*val set\_time\_between\_requests* :  **t -\> float -\> unit**

after  **set\_time\_between\_requests t v** , the main loop will wait for **v** seconds between two requests. It is taken into account immediately. Default value is 0.

*val set\_time\_between\_requests\_when\_idle* :  **t -\> float \* float -\> unit**

**set\_time\_between\_requests\_when\_idle c (a, b)** sets the time between two requests when the the windows does not have the focus, after the timeout. This amount of time is computed using an affine function (a \* t + b), where t is the amount of time elapsed since the begining of the idle phase. If you want no request at all, do  **set\_always\_active false** . Setting this to  **(0., 0.)** is equivalent to  **set\_always\_active true** . Default value is  **(0.0078125, 0.)** .
