read , async_read , write and async_write are composed functions that call class functions several times until the requested number of bytes is requested. They are included in the library as a convenience. Otherwise, each developer will need to implement the same logic.
Class functions directly transfer the main functions of the OS, which are mainly described in the documentation: these functions can be returned before all bytes are transferred.
In most cases, you should use free (bundled) functions to transfer data.
Dan
source share