mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
feat: add CFI Update
This commit is contained in:
@@ -82,6 +82,10 @@ void ProcessParser::slot_read(ClientHandler *client, QByteArray array)
|
||||
|
||||
clientBlockAuth(xmlReader,client);
|
||||
}
|
||||
else if(xmlReader.name() == "CFIObjects")
|
||||
{
|
||||
compareCFIObjects(array,client);
|
||||
}
|
||||
else
|
||||
{
|
||||
emit sigLogMessage("XmlParser: unrecognized tag");
|
||||
@@ -597,4 +601,10 @@ void ProcessParser::clientNotify(QXmlStreamReader &xmlReader,ClientHandler *clie
|
||||
processingSystem->processingClientNotify(client, clientNotify);
|
||||
}
|
||||
|
||||
void ProcessParser::compareCFIObjects(QByteArray array,ClientHandler *clientHandler)
|
||||
{
|
||||
QByteArray temp = array;
|
||||
processingSystem->processingCFIUpdate(temp,clientHandler);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ public:
|
||||
explicit ProcessParser(QObject *parent = nullptr);
|
||||
void initialize(ProcessingSystem *processingSystem);
|
||||
|
||||
void compareCFIObjects(QByteArray array,ClientHandler *clientHandler);
|
||||
public slots:
|
||||
void slot_read(ClientHandler *client, QByteArray array);
|
||||
|
||||
|
||||
@@ -226,6 +226,11 @@ void ProcessingSystem::processingClientDeAutorization(QString login)
|
||||
}
|
||||
}
|
||||
|
||||
void ProcessingSystem::processingCFIUpdate(QByteArray array, ClientHandler *handler)
|
||||
{
|
||||
handler->sendXmlAnswer(array);
|
||||
}
|
||||
|
||||
void ProcessingSystem::processingEntryUnityClient(ClientHandler *client)
|
||||
{
|
||||
QString login = client->getClient()->getLogin();
|
||||
|
||||
@@ -57,6 +57,8 @@ public:
|
||||
ClientHandler* getUnityClientById(int id);
|
||||
void processingClientDeAutorization(QString login);
|
||||
|
||||
void processingCFIUpdate(QByteArray array,ClientHandler *handler);
|
||||
|
||||
void processingEntryUnityClient(ClientHandler *client);
|
||||
void processingExitUnityClient(ClientHandler *client);
|
||||
signals:
|
||||
|
||||
@@ -510,6 +510,11 @@ void RecognizeSystem::recognize()
|
||||
packetType = PacketType::TYPE_NONE;
|
||||
client->setClientHash(hash);
|
||||
}
|
||||
|
||||
if(packetType == PacketType::TYPE_CFIUPDATE)
|
||||
{
|
||||
qDebug() << "CFI HELLO";
|
||||
}
|
||||
packetType = PacketType::TYPE_NONE;
|
||||
}
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ void SendSystem::sendFileBlockByteArray(QByteArray array, PacketType packetType)
|
||||
while (size > 0)
|
||||
{
|
||||
QByteArray chunk = array.mid(bytesSended,sendFileBlockSize);
|
||||
quint64 bytesSended = socket->write(chunk);
|
||||
bytesSended = socket->write(chunk);
|
||||
|
||||
size -= bytesSended;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user