The following methods are problematic:
Currently, the only proved way to receive a string is as: size+blob of bytes, e.g.
int string_size = connection.expectInt32();
this->map_id.resize(string_size);
connection.expectBlock(const_cast<char*>(this->map_id.data()), string_size);
After some investigation, I agree that this part is a nightmare. I'm planning to:
ConnectionWriter::appendString with appendText (appendString will be deprecated)ConnectionWriter::appendRawString with appendString (different signature) (appendRawString deprecated)ConnectionReader::expectStringThe goal is to have either appendText -> expectText or appendString -> expectString
Since there are pure interfaces involved, this is going to be a breaking change, but I searched these methods using github search, and they seem to be used only inside YARP.
Fixed by #1972
Most helpful comment
After some investigation, I agree that this part is a nightmare. I'm planning to:
ConnectionWriter::appendStringwithappendText(appendStringwill be deprecated)ConnectionWriter::appendRawStringwithappendString(different signature) (appendRawStringdeprecated)ConnectionReader::expectStringThe goal is to have either
appendText->expectTextorappendString->expectStringSince there are pure interfaces involved, this is going to be a breaking change, but I searched these methods using github search, and they seem to be used only inside YARP.