Short answer
Excluding any case of error: Practically yes, theoretically not necessary.
Long answer
From my experience, the caller does not need to call aio_write() more than once to write the entire buffer using aoi_write() .
This, however, does not guarantee that the entire buffer transferred in reality will be written. The final call to aio_error() gives the result of an integer asynchronous I / O operation, which may indicate an error.
In any case, the documentation does not explicitly exclude the case when the final call to aio_return() returns a value less than the number of bytes for the record specified in the original call to aio_write() , which really needs to be interpreted as if the entire buffer would not be sent, and this In the case, it would be necessary to call aio_write() , again transferring what was indicated as remaining for recording on the previous call.
source share