When performing an async_write with a tcp socket, when is the handler called?
问题 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? 回答1: AFAIK, the handler gets called as soon as data are written into the socket's kernel buffer. 回答2: 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. 回答3: The only guarantee