Мессенджер полностью работает

This commit is contained in:
krivoshein
2024-12-17 12:54:43 +03:00
parent e393244bf7
commit a839f964fe
69 changed files with 724 additions and 605 deletions

View File

@@ -73,6 +73,7 @@ ServerLMSWidget::ServerLMSWidget(QWidget *parent) :
connect(processingSystem,&ProcessingSystem::sigAuthChanged,this, &ServerLMSWidget::slot_AuthChanged);
connect(processingSystem,&ProcessingSystem::signal_msgToClientReady,this, &ServerLMSWidget::slot_msgToClientFromGUI);
connect(processingSystem,&ProcessingSystem::signal_msgFromClientReady,this, &ServerLMSWidget::slot_msgToGUIfromClient);
on_btnStartServer_clicked();
@@ -258,7 +259,7 @@ void ServerLMSWidget::slot_msgToGUIfromClient(QString login, QString text)
{
QString textMsg = text;
QByteArray byteArrayMsg = dataParser->xmlAnswer_message(textMsg);
QByteArray byteArrayMsg = dataParser->xmlAnswer_message(textMsg, login);
//Проходим все открытые сокеты, ищем нужный
foreach(int idSocket, clientsMap.keys())
@@ -267,7 +268,7 @@ void ServerLMSWidget::slot_msgToGUIfromClient(QString login, QString text)
if(handler->getClient()->getTypeClient() == TypeClientAutorization::TYPE_GUI)
{//Отправляем GUI-клиенту для отображения в Мессенджере
handler->sendXmlAnswer(byteArrayMsg);
handler->sendXmlAnswer(byteArrayMsg, PacketType::TYPE_XMLANSWER);
QString peerAddress = clientsMap[idSocket]->getSocket()->peerAddress().toString();
QString peerPort = QString::number(clientsMap[idSocket]->getSocket()->peerPort());