On Thu, Aug 2, 2018 at 1:02 PM, Richard Hodges
I think it's worth mentioning that although your code is very well written and laid out, the horrid internals of asio mean that only ultra-experts can read it. It really doesn't 'flow'.
Surely something can be done (in asio and networking TS) in terms of providing a cleaner, more logical interface for io_object and service developers?
I have thought about this for a few years and even made efforts to provide algorithms and types to make authoring code easier, but they were not successful. I don't think a "grand unifying theory" exists. However, I also think there is a LOT of room for documentation to grow and mature, and there is opportunity for authors to develop strong, well commented examples (something I strive for in Beast). With Networking TS as part of C++20 (or later), at last there will be one correct interface for doing asynchrony. This will incentivize book publishers and library authors to focus specifically on this networking interface to provide educational resources. In my Cppcon 2018 presentation I am also dedicating a couple of slides with guidance on how to learn Asio effectively and write correct programs. Regards