Consolidated 3 P2P thread pools into just one; this means Message object is handled in the same net thread that runs the P2P engine, instead of being offloaded to a separate "incoming Message processing" thread pool (the old ManagerBase::threadPool). If there is need to offload particular tasks off net threads, this is done in the Message handler itself, and whatever higher-level thread pool(s) do this, they are of no concern to the P2P/Net component
Removed distinction between Client and Server sessions/connections
Cleaned up code
Fixed bugs
Improved mutex use
Improved logging messages
Detailed:
removed posting of Message objects in a separate thread pool for processing; now handleMessage() is done in the same thread that pumps the bytes out of the peer socket
single io_context in P2P::ManagerBase, removed io_context from P2P::Client and P2P::Server/P2P::ServerListener
single ASIO thread pool in P2P::ManagerBase, removed threading from P2P::Client and P2P::Server
Removed Client, Server, ServerListener classes, and moved all networking functionality into a ManagerBase::Net helper class
Fix bug in Server socket acceptance where an error in accepting a connection results in the server never accepting a connection again
Fix Session::do_close()
Changed logical location logging to append the serverPort_ of the P2P node after the instance ID# (now logs looks like " #nn:nnnn ")
This PR in a nutshell:
Message
object is handled in the same net thread that runs the P2P engine, instead of being offloaded to a separate "incoming Message processing" thread pool (the old ManagerBase::threadPool). If there is need to offload particular tasks off net threads, this is done in the Message handler itself, and whatever higher-level thread pool(s) do this, they are of no concern to the P2P/Net componentDetailed: