标签:code log str resize function tor pre byte blog
一个写操作可以参考:
QDataStream &operator >>(QDataStream &in, SerializedMessage &message)
{
qint32 type;
qint32 dataLength;
QByteArray dataArray;
in >> type >> dataLength;
dataArray.resize(dataLength); // <-- You need to add this line.
int bytesRead = in.readRawData(dataArray.data(), dataLength);
// Rest of function goes here.
}
标签:code log str resize function tor pre byte blog
原文地址:http://www.cnblogs.com/ph829/p/6145680.html