void cisco2948::slotReadyRead(){ QDataStream in(m_pTcpSocket); for (;;) { if (!m_nNextBlockSize) { if (m_pTcpSocket->bytesAvailable() < sizeof(quint16)) { break; } in >> m_nNextBlockSize; } if (m_pTcpSocket->bytesAvailable() < m_nNextBlockSize) { break; } std::cout << "slotReadyRead\n"; QTime time; QString str; in >> time >> str; qDebug() << time.toString() << " " << str; m_nNextBlockSize = 0; }}