fastdo
0.6.8
|
网站会话 更多...
#include <webx_Session.hpp>
Public 成员函数 | |
Session (Request &req, winux::String const &sessid="", winux::String const &cookiesPath="/", winux::ulong cookieSessIdLifeTime=0, winux::ulong sessionLifeTime=0) | |
构造函数 更多... | |
~Session () | |
winux::Mixed & | operator[] (winux::String const &name) |
winux::Mixed const & | operator[] (winux::String const &name) const |
bool | has (winux::String const &name) const |
winux::Mixed const & | get (winux::String const &name) const |
void | set (winux::String const &name, winux::Mixed const &v) |
bool | del (winux::String const &name) |
网站会话
运行机制:
当创建一个Session对象时,若未给定sessid,则向Cookie查询一个sessid.
若没有,则新建一个sessid的cookie,值为一个唯一串,生成方式自定.
通过sessid调用sessionServer启动一个会话.
在文件 webx_Session.hpp 第 12 行定义.
eienwebx::Session::Session | ( | Request & | req, |
winux::String const & | sessid = "" , |
||
winux::String const & | cookiesPath = "/" , |
||
winux::ulong | cookieSessIdLifeTime = 0 , |
||
winux::ulong | sessionLifeTime = 0 |
||
) |
构造函数
req | 请求对象 |
sessid | 会话的SessionId,若为空则自动从Cookie获取或新生成一个 |
cookiesPath | Cookies路径,若为空则以URL相对路径设置Cookie |
cookieSessIdLifeTime | SessionId的Cookie生命期,默认为SessionServer的sessionLifeTime |
sessionLifeTime | Session生命期,默认为SessionServer的sessionLifeTime |
eienwebx::Session::~Session | ( | ) |
bool eienwebx::Session::del | ( | winux::String const & | name | ) |
winux::Mixed const& eienwebx::Session::get | ( | winux::String const & | name | ) | const |
bool eienwebx::Session::has | ( | winux::String const & | name | ) | const |
winux::Mixed& eienwebx::Session::operator[] | ( | winux::String const & | name | ) |
winux::Mixed const& eienwebx::Session::operator[] | ( | winux::String const & | name | ) | const |
void eienwebx::Session::set | ( | winux::String const & | name, |
winux::Mixed const & | v | ||
) |