fastdo  0.6.8
webx_SessionServer.hpp
浏览该文件的文档.
1 #pragma once
2 
3 namespace eienwebx
4 {
5 
10 
13 {
14  SessionData data;
16  SessionStruct() : expires(0) { }
17 };
18 
21 {
22 protected:
25 public:
30  SessionServer( winux::ulong cleanTimeInterval = 1800UL, winux::ulong sessionLifeTime = 1800UL );
31 
32  virtual ~SessionServer();
33 
34  winux::ulong getCleanTimeInterval() const { return _cleanTimeInterval; }
35 
36  winux::ulong getSessionLifeTime() const { return _sessionLifeTime; }
37 
39  virtual void clean() = 0;
40 
42  virtual bool startup( winux::String const & sessid, SessionData * sessData ) = 0;
43 
45  virtual bool save( winux::String const & sessid, SessionData const & sessData, winux::ulong thisLifeTime = 0UL ) = 0;
46 
48 };
49 
50 
51 } // namespace eienwebx
winux::ulong _cleanTimeInterval
执行"清理过期session"的时间间隔
std::map< String, Mixed > StringMixedMap
Definition: utilities.hpp:233
#define EIENWEBX_DLL
XString< tchar > String
Definition: utilities.hpp:216
winux::ulong _sessionLifeTime
默认session生命期
winux::uint expires
有效期
Web功能的相关封装
#define DISABLE_OBJECT_COPY(clsname)
Definition: utilities.hpp:81
每个访客(SessId)的会话结构
winux::StringMixedMap SessionData
会话数据
unsigned int uint
Definition: utilities.hpp:170
winux::ulong getSessionLifeTime() const
SessionData data
会话数据
unsigned long ulong
Definition: utilities.hpp:171
winux::ulong getCleanTimeInterval() const