mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
убрал мусор
This commit is contained in:
@@ -34,29 +34,12 @@ void RecognizeSystem::recognize(QTcpSocket *socket)
|
|||||||
int cntBytesAvl = 0;
|
int cntBytesAvl = 0;
|
||||||
while((cntBytesAvl = socket->bytesAvailable()) > 0)
|
while((cntBytesAvl = socket->bytesAvailable()) > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
/*
|
|
||||||
if(cntBytesAvl < 4)
|
|
||||||
{
|
|
||||||
//if(!socket->waitForReadyRead(TCP_READ_TIMEOUT))
|
|
||||||
//return;
|
|
||||||
socket->waitForReadyRead(TCP_READ_TIMEOUT);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (socket->state() != QTcpSocket::ConnectedState)
|
if (socket->state() != QTcpSocket::ConnectedState)
|
||||||
{
|
{
|
||||||
qDebug() << "RecognizeSystem::recognize socket->state() != QTcpSocket::ConnectedState";
|
qDebug() << "RecognizeSystem::recognize socket->state() != QTcpSocket::ConnectedState";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
if(!socket->waitForReadyRead(TCP_READ_TIMEOUT))
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
if(packetType == PacketType::TYPE_NONE) //определение первичного пакета
|
if(packetType == PacketType::TYPE_NONE) //определение первичного пакета
|
||||||
{
|
{
|
||||||
stream.startTransaction();
|
stream.startTransaction();
|
||||||
@@ -73,7 +56,7 @@ void RecognizeSystem::recognize(QTcpSocket *socket)
|
|||||||
else
|
else
|
||||||
socket->waitForReadyRead(100);
|
socket->waitForReadyRead(100);
|
||||||
}
|
}
|
||||||
//continue;
|
|
||||||
|
|
||||||
switch ((int)packetType)
|
switch ((int)packetType)
|
||||||
{
|
{
|
||||||
@@ -164,9 +147,6 @@ void RecognizeSystem::recognize(QTcpSocket *socket)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
//if(!socket->waitForReadyRead(TCP_READ_TIMEOUT))
|
|
||||||
//continue;
|
|
||||||
|
|
||||||
if(fileSize - sizeReceiveData >= BLOCK_SIZE)
|
if(fileSize - sizeReceiveData >= BLOCK_SIZE)
|
||||||
tmpBlock = socket->read(BLOCK_SIZE);
|
tmpBlock = socket->read(BLOCK_SIZE);
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user