ref: clientMap to MultithreadServer

This commit is contained in:
semenov
2025-08-06 09:55:14 +03:00
parent c3bd64588a
commit 305fcb2fad
7 changed files with 153 additions and 146 deletions

View File

@@ -11,8 +11,7 @@ ProcessingSystem::ProcessingSystem(ProviderDBLMS* providerDBLMS, UpdateControlle
this->updateController = updateController;
}
void ProcessingSystem::initialize(ServerLMSWidget *server,
DataParser *dataParser,
void ProcessingSystem::initialize(MultiThreadServer *server, DataParser *dataParser,
CommonClientHandler *commonClientHandler,
Logger *logger,
UpdateController *updateController,
@@ -29,7 +28,6 @@ void ProcessingSystem::initialize(ServerLMSWidget *server,
connect(this,&ProcessingSystem::sigStatusTasksAMMofTraineeChanged,commonClientHandler, &CommonClientHandler::slot_StatusTasksAMMofTraineeChanged,Qt::AutoConnection);
connect(this,&ProcessingSystem::sigStatusTasksFIMofTraineeChanged,commonClientHandler, &CommonClientHandler::slot_StatusTasksFIMofTraineeChanged,Qt::AutoConnection);
connect(this,&ProcessingSystem::sigUpdateListClients,server, &ServerLMSWidget::slotUpdateListClients,Qt::AutoConnection);
connect(this,&ProcessingSystem::sigSetData,updateController,&UpdateController::setDataInfo,Qt::AutoConnection);
connect(this,&ProcessingSystem::sigLogMessage,logger,&Logger::addTextToLogger,Qt::QueuedConnection);
}
@@ -692,9 +690,9 @@ ClientHandler *ProcessingSystem::getUnityClientById(int id)
QString login = providerDBLMS->getLoginTraineeById(id);
//Проходим все открытые сокеты, ищем нужный
foreach(int idSocket, server->getClientsMap().keys())
foreach(int idSocket, server->getClientsMap()->keys())
{
ClientHandler *handler = server->getClientsMap().value(idSocket);
ClientHandler *handler = server->getClientsMap()->value(idSocket);
if(handler->getClient()->getLogin() == login)
{
if(handler->getClient()->GETTYPE() == TypeClientAutorization::TYPE_UNITY_CLIENT)