Hi all,

Im using streamMessage to send data. I dont know why, but if I send
something by this way:

streamMessage->writeString(key);
 streamMessage->writeBytes(bytesParameter->getValue());

When i catch the message on reception I need to do two readBytes to catch
the bytes sent, like this:

std::string key=streamMessage->readString();
int sizeBytesData=packetDesc.at(++it);
 std::vector<unsigned char> data(sizeBytesData);
streamMessage->readBytes(data);
 streamMessage->readBytes(data);


Any clue?

-- 
Óscar Pernas Plaza.

Reply via email to