mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
ref: change send command
This commit is contained in:
@@ -68,39 +68,6 @@ QTcpSocket *TCPClient::getSocket()
|
||||
return socket;
|
||||
}
|
||||
|
||||
void TCPClient::slotSendCommand(QString command)
|
||||
{
|
||||
QDataStream stream(socket);
|
||||
QByteArray data;
|
||||
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
|
||||
|
||||
if(!command.isEmpty() && socket->state() == QTcpSocket::ConnectedState){
|
||||
|
||||
if(command == "check")
|
||||
{
|
||||
stream << PacketType::TYPE_COMMAND;
|
||||
stream << command;
|
||||
socket->waitForBytesWritten();
|
||||
|
||||
sendSystem->sendFileBlock(staticDataFolderName + hashFilename);
|
||||
emit sigSendDebugLog(Tools::getTime() + " Local checkFile sended");
|
||||
|
||||
socket->waitForReadyRead(1000);
|
||||
}
|
||||
else if(command == "update"){
|
||||
emit sigSendDebugLog("Update started");
|
||||
stream << PacketType::TYPE_COMMAND;
|
||||
stream << command;
|
||||
socket->waitForReadyRead(1000);
|
||||
}
|
||||
else if(command == "run"){
|
||||
externalExecuter->callApp();
|
||||
}
|
||||
}else{
|
||||
emit sigSendDebugLog("WRONG SOCKET AFTER ENTERED");
|
||||
}
|
||||
}
|
||||
|
||||
void TCPClient::slotConnectNotify()
|
||||
{
|
||||
if(socket->state() != QTcpSocket::ConnectedState)
|
||||
|
||||
Reference in New Issue
Block a user