ref: init package

This commit is contained in:
semenov
2025-06-26 17:59:24 +03:00
parent ef17ee4ab8
commit ce78420a07
2 changed files with 23 additions and 8 deletions

View File

@@ -96,8 +96,14 @@ void SendSystem::sendFolderBlock(QString path)
void SendSystem::sendQTConnect()
{
QString value = QString::number(PacketType::TYPE_QT);
socket->write(value.toUtf8());
QByteArray container;
int numPackage = (int)PacketType::TYPE_QT;
container.append(numPackage & 0x000000ff);
container.append((numPackage >> 8) & 0x000000ff);
container.append((numPackage >> 16) & 0x000000ff);
container.append((numPackage >> 24) & 0x000000ff);
socket->write(container);
socket->waitForBytesWritten();
}