Closed iByteSpace closed 2 years ago
The size of VariableSizeReader::buffer_ is 4 bytes.
But mutable_buffer of VariableSizeReader::buffer returned is 1 byte (sizeof(uint8_t)).
So from asio::read, you can only read 1 byte at most. This may be an error.
It's not a error. This is a buffer that is written byte by byte. In this case, each of the bytes can be the last. This is indicated by the name of the class - VariableSizeReader.
The size of VariableSizeReader::buffer_ is 4 bytes.
But mutable_buffer of VariableSizeReader::buffer returned is 1 byte (sizeof(uint8_t)).
So from asio::read, you can only read 1 byte at most. This may be an error.