Short answer
Excluding any case of error: Practical yes, theoratical not necessarily.
Long answer
From my experience the caller does not need to call aio_write()
more then once to write the whole buffer using aoi_write()
.
This however is not a guarantee that the whole buffer passed in really will be written. A final call to aio_error()
gives the result of the whole asyncronous I/O operation, which could indicate an error.
Anyhow the documentation does not explicitly excludes the case that the final call to aio_return()
returns a value less then the amount of bytes to write out specified in the original call to aio_write()
, what indeed needs to be interpreted as that not the whole buffer would have been sent, in which case it would be necessary to call aio_write()
again passing in what whould have been indicated as having been left over to write by the previous call.