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
src/network/command.cpp
0 → 100644
src/network/command.hpp
0 → 100644