[ Previous ] [ Contents ] [ Index ] [ Next ]

Maintaining State

Version 2.1 of AOLserver allows you to maintain state data, stored in a Tcl ns_set structure, across connections and server reboots for a configurable amount of time.

Configuration

To enable Tcl to maintain state data, you need to load a Tcl-only module (see Tcl-only Modules) called "tclstate" and define a TimeOut parameter for the module. The new TimeOut configuration parameter determines how long (in minutes) state data is maintained. For example:

    [ns/server/myserver/modules]
    tclstate=tcl
    [ns/server/myserver/module/tclstate]
    TimeOut=35

The above configuration specifies that state data will be maintained for 35 minutes.

Tcl Interface

The following Tcl functions are available to manipulate and access state data, described in detail in the Tcl Function Reference:

ns_state_delete
ns_state_restore
ns_state_save
ns_state_view

Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1996 America Online, Inc.