Implement the protocol chunks as a Command class.
This makes the data easier to track and free after they were sent. And it makes sure the buffer stays valid for all the async_write() process. It’s also easier to send data without having to bother with creating a string, parsing everything, etc.
Showing with 290 additions and 149 deletions