Update saktcpservertool.cc

Fixed TCP server not displaying received data
This commit is contained in:
Pemvin 2024-03-13 18:39:04 +08:00 committed by GitHub
parent f73a541140
commit 56d8cf3a27
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -42,8 +42,10 @@ bool SAKTcpServerTool::initialize(QString &errStr)
connect(client, &QTcpSocket::readyRead, client, [=]() {
QByteArray bytes = client->readAll();
QString hex = bytes.toHex();
qInfo() << QString("%1<-%2:%3").arg(m_bindingIpPort, ipPort, hex);
QString msg = QString("%1<-%2:%3").arg(m_bindingIpPort, ipPort, hex);
qInfo() << msg;
emit outputBytes(bytes);
emit bytesRead(bytes, ipPort);
});
connect(client, &QTcpSocket::disconnected, client, [=]() {