OneLoneCoder/olcPixelGameEngine

asio async_read

ol3301 opened this issue · 1 comments

What happens if async_read reads not full buff size? As I know, it might be with bad network.

async_read() reference says

This function is used to asynchronously read a certain number of bytes of data from a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-The supplied buffers are full. That is, the bytes transferred is equal to the sum of the buffer sizes.
-An error occurred.

so, you won't have a problem of reading not full buff size.