Main authentication server class handling sessions and user validation. More...
#include <gauthserver.hpp>


Public Types | |
| typedef std::map< int, UserInfo > | UserMap |
| Map для хранения информации о пользователях (userid -> UserInfo). | |
| typedef std::map< int, unsigned int > | AccountingMap |
| Map для учета времени онлайн (userid -> время в секундах). | |
| typedef std::map< unsigned int, char > | ZoneMap |
| Map для связи сессий и зон (session id -> zoneid). | |
Public Member Functions | |
| std::string | Identification () const |
| Идентификатор протокола. | |
| void | SetAccumulate (size_t size) |
| Установить лимит накопления данных. | |
| GAuthServer () | |
| Конструктор по умолчанию. | |
| bool | ValidUser (Session::ID sid, int userid) |
| Проверить валидность пользователя. | |
| void | SetSidIdx (int idx) |
| Установить индекс аутентификации. | |
| int | GetSidIdx () |
| Получить индекс аутентификации. | |
Static Public Member Functions | |
| static GAuthServer * | GetInstance () |
| Получить экземпляр синглтона. | |
Public Attributes | |
| Octets | shared_key |
| Общий ключ для шифрования. | |
| Thread::RWLock | locker_map |
| Блокировка для доступа к usermap. | |
| UserMap | usermap |
| Контейнер с данными пользователей. | |
| Thread::Mutex | locker_accntmap |
| Блокировка для доступа к accntmap. | |
| AccountingMap | accntmap |
| Контейнер с данными о времени онлайн. | |
| Thread::Mutex | locker_zonemap |
| Блокировка для доступа к zonemap. | |
| ZoneMap | zonemap |
| Контейнер с данными о зонах. | |
Main authentication server class handling sessions and user validation.
Класс-менеджер для управления аутентификацией и сессиями пользователей.
Singleton instance managing client sessions, zone mappings, and user authentication.
Definition at line 44 of file gauthserver.hpp.
| typedef std::map<int, unsigned int> GNET::GAuthServer::AccountingMap |
Map для учета времени онлайн (userid -> время в секундах).
Definition at line 136 of file gauthserver.hpp.
| typedef std::map<int, UserInfo> GNET::GAuthServer::UserMap |
Map для хранения информации о пользователях (userid -> UserInfo).
Definition at line 115 of file gauthserver.hpp.
| typedef std::map<unsigned int, char> GNET::GAuthServer::ZoneMap |
Map для связи сессий и зон (session id -> zoneid).
Definition at line 145 of file gauthserver.hpp.
|
inline |
Конструктор по умолчанию.
Definition at line 97 of file gauthserver.hpp.

|
inlinestatic |
Получить экземпляр синглтона.
Definition at line 80 of file gauthserver.hpp.


|
inline |
Получить индекс аутентификации.
Definition at line 128 of file gauthserver.hpp.
|
inline |
Идентификатор протокола.
Definition at line 86 of file gauthserver.hpp.

|
inline |
Установить лимит накопления данных.
| size | Новый лимит. |
Definition at line 92 of file gauthserver.hpp.

|
inline |
Установить индекс аутентификации.
| idx | Новый индекс. |
Definition at line 122 of file gauthserver.hpp.
| bool GNET::GAuthServer::ValidUser | ( | Session::ID | sid, |
| int | userid ) |
Проверить валидность пользователя.
Validates user-session association.
| sid | Идентификатор сессии. |
| userid | Идентификатор пользователя. |
| sid | Session ID to validate. |
| userid | User ID to check. |
Uses read lock for thread-safe access to usermap.
Definition at line 65 of file gauthserver.cpp.
| AccountingMap GNET::GAuthServer::accntmap |
Контейнер с данными о времени онлайн.
Definition at line 137 of file gauthserver.hpp.
| Thread::Mutex GNET::GAuthServer::locker_accntmap |
Блокировка для доступа к accntmap.
Definition at line 130 of file gauthserver.hpp.
| Thread::RWLock GNET::GAuthServer::locker_map |
Блокировка для доступа к usermap.
Definition at line 109 of file gauthserver.hpp.
| Thread::Mutex GNET::GAuthServer::locker_zonemap |
Блокировка для доступа к zonemap.
Definition at line 139 of file gauthserver.hpp.
| Octets GNET::GAuthServer::shared_key |
Общий ключ для шифрования.
Definition at line 99 of file gauthserver.hpp.
| UserMap GNET::GAuthServer::usermap |
Контейнер с данными пользователей.
Definition at line 116 of file gauthserver.hpp.
| ZoneMap GNET::GAuthServer::zonemap |
Контейнер с данными о зонах.
Definition at line 146 of file gauthserver.hpp.