42 int main(
int argc,
char *argv[])
45 if (argc != 2 || access(argv[1], R_OK) == -1)
47 std::cerr <<
"Usage: " << argv[0] <<
" configurefile" << std::endl;
52 Conf *conf = Conf::GetInstance(argv[1]);
53 Log::setprogname(
"gauthd");
60 std::string value = conf->find(manager->
Identification(),
"shared_key");
61 manager->
shared_key = Octets(value.c_str(), value.size());
63 Protocol::Server(manager);
69 const char *location =
"GMysqlClient";
72 conf->find(location,
"address").c_str(),
73 atoi(conf->find(location,
"port").c_str()),
74 conf->find(location,
"user").c_str(),
75 conf->find(location,
"passwd").c_str(),
76 conf->find(location,
"name").c_str(),
77 atoi(conf->find(location,
"hash").c_str())
82 const char *alex =
"AlexPatch";
84 atoi(conf->find(alex,
"lkmod").c_str()),
85 atoi(conf->find(alex,
"loginlog").c_str()),
86 conf->find(alex,
"logoutshell").c_str()
92 Thread::Pool::AddTask(PollIO::Task::GetInstance());
Основной класс для работы с MySQL базой данных
void Init(const char *ip, const int port, const char *user, const char *passwd, const char *db, const int h)
Инициализация параметров подключения
void AlexPatch(const bool lkmod, const bool log, const char *shell)
Дополнительные настройки
bool Connect()
Установить соединение с БД
static GMysqlClient * GetInstance()
Получить экземпляр класса (Singleton)
Periodic task manager for financial and security checks.
Main authentication server class handling sessions and user validation.
static GAuthServer * GetInstance()
Получить экземпляр синглтона.
void SetAccumulate(size_t size)
Установить лимит накопления данных.
Octets shared_key
Общий ключ для шифрования.
std::string Identification() const
Идентификатор протокола.
int main(int argc, char *argv[])
Главная функция программы.
Заголовочный файл, содержащий определения классов для аутентификации и управления сессиями.
MySQL клиент для работы с базой данных игрового сервера
Основное пространство имен для сетевых компонентов системы.