This is just a simple question of how async_write behaves with tcp sockets. Basically, when working with a tcp socket, does the write handler get called when the data gets written to the socket, or when an ack is received from the destination?
AFAIK, the handler gets called as soon as data are written into the socket's kernel buffer.
Same behavior as the BSD socket's send() - it completes when the OS has a copy of the data. This will be before an ACK.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With