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