(index ("session-lifetime" 0) ("session-id-generator" 143) ("match-ip-address?" 522) ("session-create" 696) ("session-refresh!" 993) ("session-valid?" 1227) ("session-destroy!" 1836) ("session-ref" 1964) ("session-set!" 2215) ("session-del!" 2468) ("session-bindings" 2661) ("session-set-finalizer!" 2864) ("session-storage-initialize" 3199) ("session-storage-set!" 3401) ("session-storage-ref" 3637) ("session-storage-delete!" 3813))
(def (sig (parameter "(session-lifetime [number])" (id session-lifetime))) (p "The lifetime of sessions in seconds.  Default is 3600s (1h)."))
(def (sig (parameter "(session-id-generator [procedure])" (id session-id-generator))) (p "A zero argument procedure which generates a random unique identifier for sessions. Defaults to a procedure which concatenates " (tt "current-milliseconds") " with the process ID and a random number between 0 and 1000 plus the " (tt "current-process-id") " and returns its SHA-1 digest."))
(def (sig (parameter "(match-ip-address? [boolean])" (id match-ip-address?))) (p "Indicates whether http-session should match IP addresses to check if sessions are valid."))
(def (sig (procedure "(session-create #!optional (bindings '()))" (id session-create))) (p "Creates a session and returns the session identifier.") (p "The optional " (tt "bindings") " argument is an alist " (tt "'((symbol . value)...)") " of variable bindings valid for the generated session."))
(def (sig (procedure "(session-refresh! sid)" (id session-refresh!))) (p "Refreshes the session identified by " (tt "sid") ", that is, sets the lifetime of the session identified by " (tt "sid") " to " (tt "(session-lifetime)") "."))
(def (sig (procedure "(session-valid? sid)" (id session-valid?))) (p "Returns " (tt "#t") " if the session identified by " (tt "sid") " is valid.  Returns " (tt "#f") " otherwise.") (p "A session is valid if (all items should be satisfied):") (ul (li "There is a session identifier equal to " (tt "sid") " in the session table") (li "The session lifetime corresponding to the session identified by " (tt "sid") " is greater than zero") (li "When " (tt "match-ip-address?") " is not " (tt "#f") ", the IP number corresponding to the session identified by " (tt "sid") " matches the IP number of the client")))
(def (sig (procedure "(session-destroy! sid)" (id session-destroy!))) (p "Destroys the session identified by " (tt "sid") "."))
(def (sig (procedure "(session-ref sid var #!optional default)" (id session-ref))) (p "Returns the value corresponding to VAR from the bindings alist of the session identified by " (tt "sid") ".  If the binding does not exist, DEFAULT is returned."))
(def (sig (procedure "(session-set! sid var val)" (id session-set!))) (p "Sets a value VAL for the VAR symbol in the bindings alist for the session identified by " (tt "sid") ".  If the symbol does not exist in the bindings alist, it is added to it."))
(def (sig (procedure "(session-del! sid var)" (id session-del!))) (p "Deletes the VAR symbol and its corresponding value from the bindings alist of the session identified by " (tt "sid") "."))
(def (sig (procedure "(session-bindings sid)" (id session-bindings))) (p "Returns an alist " (tt "'((variable . value) ... )") " representing the bindings of the session identified by " (tt "sid") "."))
(def (sig (procedure "(session-set-finalizer! sid proc)" (id session-set-finalizer!))) (p "Sets a finalizer procedure (" (tt "proc") ") for the session identified by " (tt "sid") ". " (tt "proc") " is an one-argument procedure which receives the session identifier as argument and is executed right before the session is destroyed."))
(def (sig (parameter "(session-storage-initialize)" (id session-storage-initialize))) (p "A procedure that returns the session storage.  The object returned by the default procedure is a hash-table."))
(def (sig (parameter "session-storage-set!" (id session-storage-set!))) (p "A two-argument procedure (" (tt "sid") " and " (tt "session-item") ") that sets the given " (tt "session-item") " in the session storage for " (tt "sid") "."))
(def (sig (parameter "session-storage-ref" (id session-storage-ref))) (p "A one-argument procedure that given the session identifier returns the corresponding session item."))
(def (sig (parameter "session-storage-delete!" (id session-storage-delete!))) (p "A one-argument procedure that deletes the session item correspoding to the given session identifier."))
