void InputSocketStream::readValue(serialization::pimpl::Data &data) { size_t size = (size_t)readInt(); if (size > 0) { std::vector<byte> &buffer = data.toByteArray(); buffer.resize(size); readFully(buffer); } }
int32_t ClientMessage::calculateDataSize(const serialization::pimpl::Data ¶m) { return INT32_SIZE + // bytes for the length field (int32_t) param.totalSize(); }
void ClientMessage::set(const serialization::pimpl::Data &value) { setArray<byte>(value.toByteArray()); }