MsgPackStream: writeBytes() added

This commit is contained in:
Isaikin Roman
2015-05-29 20:15:26 +03:00
parent 7d5d72e814
commit 9e61498ca2
3 changed files with 29 additions and 2 deletions
+8
View File
@@ -442,6 +442,14 @@ MsgPackStream &MsgPackStream::operator<<(QByteArray array)
return *this;
}
bool MsgPackStream::writeBytes(const char *data, uint len)
{
CHECK_STREAM_WRITE_PRECOND(*this);
if (dev->write(data, len) != len)
setStatus(WriteFailed);
return *this;
}
bool MsgPackStream::unpack_upto_quint8(quint8 &u8, quint8 *p)
{
if (*p <= MsgPack::FirstByte::POSITIVE_FIXINT) {