Files
module-fastwebcore/target/fastweb/session.lua
2026-03-31 16:00:38 +08:00

61 lines
885 B
Lua
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
local M = {}
M.__index = M
function M.new(fwsession)
local instance = setmetatable({}, M)
instance.module = fwsession
return instance
end
--[[
FUNCTION 初始化会话对象
PARAM
session_id : 会话ID
--]]
function M:init(id)
return self.module:init(fw_request,id)
end
--[[
FUNCTION 取sessionid
--]]
function M:id()
return self.module:id()
end
--[[
FUNCTION 更新
DESC用于更新过期时间等
--]]
function M:update()
self.module:update()
end
--[[
FUNCTION 置会话属性
PARAM
name : 名称
value : 值
--]]
function M:set(name,value)
self.module:set(name,value)
end
--[[
FUNCTION 取会话属性
PARAM
name 名称
--]]
function M:get(name)
return self.module:get(name)
end
--[[
FUNCTION 检查会话有效性
--]]
function M:check()
return self.module:check()
end
return M