Hobrasoft httpd server
Embedded HTTP server for Qt and C++
|
Session store. More...
#include <httpsessionstore.h>
Signals | |
void | aboutToRemove (const HttpSession &session) const |
Signal is emited when a session is about to remove from storage. | |
Public Member Functions | |
HttpSessionStore (const HttpSettings *settings, QObject *parent) | |
Constructor. | |
HttpSessionStore (HttpServer *server) | |
Constructor. | |
QByteArray | sessionId (HttpRequest *request, HttpResponse *response) |
Returns session ID associated with the request or response. | |
HttpSession | session (HttpRequest *request, HttpResponse *response) |
Returns session associated with the request or response. | |
HttpSession | session (const QByteArray &id) |
Returns session. | |
void | remove (HttpSession session) |
Removes session. | |
void | setSessionCookieName (const QString &x) |
Sets the name of the session cookie. More... | |
const QString & | sessionCookieName () const |
Returns the session cookie name. | |
bool | contains (const QByteArray &id) const |
Private Slots | |
void | slotCleaner () |
Slot cleans the store from old sessions. | |
Private Member Functions | |
void | init () |
Private Attributes | |
QTimer * | m_cleaner |
Timer for store cleaning from old sessions. | |
QHash< QByteArray, HttpSession > | m_sessions |
List of stored sessions. | |
QString | m_sessionCookieName |
The name of the session cookie. | |
const HttpSettings * | m_settings |
Pointer to http server settings. | |
Session store.
Definition at line 29 of file httpsessionstore.h.
|
inline |
Sets the name of the session cookie.
For some specific use it is needed to set some random cookie name for every session.
Definition at line 68 of file httpsessionstore.h.