QDataStream sendOut(&outBlock,QIODevice::WriteOnly);
sendOut.setVersion(QDataStream:t_4_0);
QString currentFileName = fileName.right(fileName.size() - fileName.lastIndexOf('/') - 1);//倒着数,计算位置
sendOut <<qint64(0) << qint64(0) << currentFileName <<ipAdress ;
qDebug() << tr("ipAdressSize;") << ipAdress.size();
qDebug() << tr("currentName:") << currentFileName; //名字没存进去
qDebug() << tr("da xiao :") << currentFileName.size(); //大小
qDebug() << tr("zong da xioa :") << outBlock.size();
结果:
"ipAdressSize;" 9 "currentName:" "client.cpp" "da xiao :" 10 "zong da xioa :" 62
qint64 不就是8个字节吗??
这个结果是怎么得来的???
|