Qt socket测试
if (tcpSocketObj->state()==QAbstractSocket::SocketState::ConnectedState) { qDebug() << "send data:"<<dataStr; tcpSocketObj->write(dataStr.toUtf8()); }
if (tcpSocketObj->state() == QAbstractSocket::ConnectedState) { QByteArray data = tcpSocketObj->readAll(); qDebug() << "Received data:" << data; // 在这里处理接收到的数据 }
######################
QQ 3087438119