I am learning boost :: asio and now am messing up the correct path to read the full buffer. For example, when the connection is established, I want to read int32 as follows:
std::uint32_t size;
size_t len = m_socket.read_some(buffer(&size, sizeof(std::uint32_t)));
As you can see, I am adjusting the size of the buffer. In another case, I got "len" with read_some data duration.
So, the main question: is boost :: asio guaranteed that all 4 uint32_t bytes will be read if I configure the required buffer length when calling 'buffer'?
Or, if it is not insured - how can I read the full buffer? (all 4 bytes)
source
share