---
name: "Eliom_state.Ext.server"
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_state.Ext.server"
---

# Eliom\_state.Ext.server(3o)

no description

## NAME

Eliom\_state.Ext - no description

## Module

Module   Eliom\_state.Ext

## Documentation

Module **Ext**\
  :  **sig end**

*exception Wrong\_scope*

Exception raised when you try to access a reference belonging to a scope different to the state's scope

*type timeout* =\
  \| TGlobal  (\* see global setting \*)\
  \| TNone  (\* explicitly set no timeout \*)\
  \| TSome **of** **float**

Type used to describe session timeouts

**=== timeout duration in seconds ===**

*type service\_cookie\_info*

These types are used to get or set information about browser or process cookies (like timeouts).

*type data\_cookie\_info*

*type persistent\_cookie\_info*

*type* **(+'a, +'b)** *state*

The type of states. The first parameter corresponds to the scope level and the second one to the kind of state (volatile or persistent data, or service state)

*val volatile\_data\_group\_state* :  **?scope:Eliom\_common.session\_group\_scope -\>** **string -\> (\[\> \`Session\_group \], \[\> \`Data \]) state**

**volatile\_data\_group\_state ~scope n** returns the state corresponding to the group named  **n** in scope  **scope** .

*val persistent\_data\_group\_state* :  **?scope:Eliom\_common.session\_group\_scope -\>** **string -\> (\[\> \`Session\_group \], \[\> \`Pers \]) state**

Same for persistent data

*val service\_group\_state* :  **?scope:Eliom\_common.session\_group\_scope -\>** **string -\> (\[\> \`Session\_group \], \[\> \`Service \]) state**

Same for services

*val current\_volatile\_session\_state* :  **?secure:bool -\>** **?scope:Eliom\_common.session\_scope -\>** **unit -\> (\[\< \`Session \], \[\< \`Data \]) state**

**current\_volatile\_session\_state ~scope** returns the state corresponding to current session in scope  **scope** .

*val current\_persistent\_session\_state* :  **?secure:bool -\>** **?scope:Eliom\_common.session\_scope -\>** **unit -\> (\[\< \`Session \], \[\< \`Pers \]) state Lwt.t**

Same for persistent data

*val current\_service\_session\_state* :  **?secure:bool -\>** **?scope:Eliom\_common.session\_scope -\>** **unit -\> (\[\< \`Session \], \[\< \`Service \]) state**

Same for services

*val discard\_state* :  **state:('a, 'b) state -\> unit Lwt.t**

Discard external states

*val fold\_volatile\_sub\_states* :  **?sitedata:Eliom\_common.sitedata -\>** **state:(\[\< \`Session \| \`Session\_group \], \[\< \`Data \| \`Service \] as 'k)** **state -\>** **('a -\> (\[\< \`Client\_process \| \`Session \], 'k) state -\> 'a) -\>** **'a -\> 'a**

Fold all sessions in a groups, or all client processes in a session. If you do not call the function during a request or during the initialisation phase of the Eliom module, you must provide the extra parameter  **?sitedata** , that you can get by calling  **Eliom\_request\_info.get\_sitedata** during the initialisation phase of the Eliom module.

*val iter\_volatile\_sub\_states* :  **?sitedata:Eliom\_common.sitedata -\>** **state:(\[\< \`Session \| \`Session\_group \], \[\< \`Data \| \`Service \] as 'k)** **state -\>** **((\[\< \`Client\_process \| \`Session \], 'k) state -\> unit) -\> unit**

Iter on all sessions in a groups, or all client processes in a session. See  **Eliom\_state.Ext.fold\_volatile\_sub\_states** for explanation about the  **?sitedata** parameter.

*val fold\_sub\_states* :  **?sitedata:Eliom\_common.sitedata -\>** **state:(\[\< \`Session \| \`Session\_group \], \[\< \`Data \| \`Pers \| \`Service \] as 'k)** **state -\>** **('a -\>** **(\[\< \`Client\_process \| \`Session \], 'k) state -\> 'a Lwt.t) -\>** **'a -\> 'a Lwt.t**

Fold all sessions in a groups, or all client processes in a session. See  **Eliom\_state.Ext.fold\_volatile\_sub\_states** for explanation about the  **?sitedata** parameter.

*val iter\_sub\_states* :  **?sitedata:Eliom\_common.sitedata -\>** **state:(\[\< \`Session \| \`Session\_group \], 'k) state -\>** **((\[\< \`Client\_process \| \`Session \], 'k) state -\> unit Lwt.t) -\>** **unit Lwt.t**

Iter on all sessions in a groups, or all client processes in a session. See  **Eliom\_state.Ext.fold\_volatile\_sub\_states** for explanation about the  **?sitedata** parameter.

*module Low\_level :* **sig end**

*val get\_service\_cookie\_info* :  **(\[\< Eliom\_common.cookie\_level \], \[ \`Service \]) state -\>** **service\_cookie\_info**

Get the infomration about cookies (timeouts, etc.)

*val get\_volatile\_data\_cookie\_info* :  **(\[\< Eliom\_common.cookie\_level \], \[ \`Data \]) state -\>** **data\_cookie\_info**

*val get\_persistent\_cookie\_info* :  **(\[\< Eliom\_common.cookie\_level \], \[ \`Pers \]) state -\>** **persistent\_cookie\_info Lwt.t**

*val get\_service\_cookie\_scope* :  **cookie:service\_cookie\_info -\> Eliom\_common.user\_scope**

*val get\_volatile\_data\_cookie\_scope* :  **cookie:data\_cookie\_info -\> Eliom\_common.user\_scope**

*val get\_persistent\_data\_cookie\_scope* :  **cookie:persistent\_cookie\_info -\> Eliom\_common.user\_scope**

*val set\_service\_cookie\_timeout* :  **cookie:service\_cookie\_info -\> float option -\> unit**

*val set\_volatile\_data\_cookie\_timeout* :  **cookie:data\_cookie\_info -\> float option -\> unit**

*val set\_persistent\_data\_cookie\_timeout* :  **cookie:persistent\_cookie\_info -\> float option -\> unit Lwt.t**

*val get\_service\_cookie\_timeout* :  **cookie:service\_cookie\_info -\> timeout**

*val get\_volatile\_data\_cookie\_timeout* :  **cookie:data\_cookie\_info -\> timeout**

*val get\_persistent\_data\_cookie\_timeout* :  **cookie:persistent\_cookie\_info -\> timeout**

*val unset\_service\_cookie\_timeout* :  **cookie:service\_cookie\_info -\> unit**

*val unset\_volatile\_data\_cookie\_timeout* :  **cookie:data\_cookie\_info -\> unit**

*val unset\_persistent\_data\_cookie\_timeout* :  **cookie:persistent\_cookie\_info -\> unit Lwt.t**

*val get\_session\_group\_list* :  **unit -\> string list**

Returns a list containing the names of all session group that are available for this site.

*val iter\_service\_cookies* :  **(service\_cookie\_info -\> unit Lwt.t) -\> unit Lwt.t**

Iterator on all active service cookies. **Lwt\_unix.yield** is called automatically after each iteration.

*val iter\_volatile\_data\_cookies* :  **(data\_cookie\_info -\> unit Lwt.t) -\> unit Lwt.t**

Iterator on data cookies.  **Lwt\_unix.yield** is called automatically after each iteration.

*val iter\_persistent\_data\_cookies* :  **(persistent\_cookie\_info -\> unit Lwt.t) -\> unit Lwt.t**

Iterator on persistent cookies.  **Lwt\_unix.yield** is called automatically after each iteration.

*val fold\_service\_cookies* :  **(service\_cookie\_info -\> 'b -\> 'b Lwt.t) -\> 'b -\> 'b Lwt.t**

Iterator on service cookies.  **Lwt\_unix.yield** is called automatically after each iteration.

*val fold\_volatile\_data\_cookies* :  **(data\_cookie\_info -\> 'b -\> 'b Lwt.t) -\> 'b -\> 'b Lwt.t**

Iterator on data cookies.  **Lwt\_unix.yield** is called automatically after each iteration.

*val fold\_persistent\_data\_cookies* :  **(persistent\_cookie\_info -\> 'b -\> 'b Lwt.t) -\> 'b -\> 'b Lwt.t**

Iterator on persistent cookies.  **Lwt\_unix.yield** is called automatically after each iteration.
