Hobrasoft httpd server
Embedded HTTP server for Qt and C++
Signals | Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
HobrasoftHttpd::HttpSessionStore Class Reference

Session store. More...

#include <httpsessionstore.h>

Inheritance diagram for HobrasoftHttpd::HttpSessionStore:

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, HttpSessionm_sessions
 List of stored sessions.
 
QString m_sessionCookieName
 The name of the session cookie.
 
const HttpSettingsm_settings
 Pointer to http server settings.
 

Detailed Description

Session store.

Definition at line 29 of file httpsessionstore.h.

Member Function Documentation

◆ setSessionCookieName()

void HobrasoftHttpd::HttpSessionStore::setSessionCookieName ( const QString &  x)
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.


The documentation for this class was generated from the following files: