diff options
| author | Dennis Brentjes <d.brentjes@gmail.com> | 2016-08-30 16:06:04 +0200 |
|---|---|---|
| committer | Dennis Brentjes <d.brentjes@gmail.com> | 2016-08-30 16:07:44 +0200 |
| commit | 5bac5321fa5ab128cee2f0b8c549945bd6a1ccfc (patch) | |
| tree | 25fc89fc4074d469ab0110a39b8f1419c2690068 /network-handler/node.hpp | |
| parent | 825fc3d44eb6a3837bb922815c4351aa011a213c (diff) | |
| download | cmix-5bac5321fa5ab128cee2f0b8c549945bd6a1ccfc.tar.gz cmix-5bac5321fa5ab128cee2f0b8c549945bd6a1ccfc.tar.bz2 cmix-5bac5321fa5ab128cee2f0b8c549945bd6a1ccfc.zip | |
Split NetworkHandler in a server component and a to reuse Server.
Also switched from an inheritance system to composition based system for
the server based classes.
Diffstat (limited to 'network-handler/node.hpp')
| -rw-r--r-- | network-handler/node.hpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/network-handler/node.hpp b/network-handler/node.hpp new file mode 100644 index 0000000..7d30188 --- /dev/null +++ b/network-handler/node.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include "server.hpp" +#include "nodeclient.hpp" + +#include <boost/asio/io_service.hpp> + +#include <list> + +class Node +{ + boost::asio::io_service io_service; + Server server; + std::list<NodeClient> clients; + + void accept_handler(boost::asio::ip::tcp::socket&& socket); + +public: + Node(ListenSettings const& listen_settings); +}; + |
