This repository was archived by the owner on Nov 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
class memory_session_storage
5cript edited this page Apr 25, 2021
·
6 revisions
class memory_session_storage
: public attender::session_storage_interface
| Members | Descriptions |
|---|---|
public inline virtual void clear() |
Clears all sessions from the storage. |
public inline virtual uint64_t size() |
Returns the amount of session in the session storage. |
public inline virtual std::string create_session() |
Create a session and return the id. |
public inline virtual void delete_session(std::string const & id) |
Used to kill a specific session. |
public inline virtual bool get_session(std::string const & id,session * session)
|
Get a session from the storage. |
public inline virtual bool set_session(std::string const & id,session const & session)
|
Get a session from the storage. |
Clears all sessions from the storage.
Returns the amount of session in the session storage.
Imlementation might be slow! Do not abuse.
Create a session and return the id.
DO NOT USE AUTOINCREMENT IDs.
Used to kill a specific session.
public inline virtual bool get_session(std::string const & id,session * session)
Get a session from the storage.
-
idThe session id. -
session[out] Some sort of session. Is ignored if session is nullptr
Returns: Returns whether the session exists or not.
public inline virtual bool set_session(std::string const & id,session const & session)
Get a session from the storage.
-
idThe session id. -
dataSome sort of session.
Returns: Returns whether the session exists or not.