aboutsummaryrefslogtreecommitdiff
path: root/network-handler/client.hpp
diff options
context:
space:
mode:
authorDennis Brentjes <d.brentjes@gmail.com>2016-08-29 15:35:26 +0200
committerDennis Brentjes <d.brentjes@gmail.com>2016-08-29 15:35:26 +0200
commit7097015fa3d2737b2e9438fdba9ec7b8f5630421 (patch)
tree1fc277780216aa9142281458967d94a1cb4fcd1f /network-handler/client.hpp
parentcffc1ec24d7781130b600a24b9726b5168a7b053 (diff)
downloadcmix-7097015fa3d2737b2e9438fdba9ec7b8f5630421.tar.gz
cmix-7097015fa3d2737b2e9438fdba9ec7b8f5630421.tar.bz2
cmix-7097015fa3d2737b2e9438fdba9ec7b8f5630421.zip
Refactored Client to be more reusable.
Added UserClient and NodeClient classes to handle communication from and to Clients and Nodes respectively.
Diffstat (limited to 'network-handler/client.hpp')
-rw-r--r--network-handler/client.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/network-handler/client.hpp b/network-handler/client.hpp
index 716e2cf..fa0c6d6 100644
--- a/network-handler/client.hpp
+++ b/network-handler/client.hpp
@@ -14,6 +14,15 @@ private:
boost::asio::streambuf buffer;
OnDoneFT done;
+ Client() = delete;
+ Client(Client const&) = delete;
+ Client(Client&&) = delete;
+
+ Client& operator=(Client const&) = delete;
+ Client& operator=(Client&&) = delete;
+
+protected:
+ virtual void handle_message(std::vector<uint8_t> message) = 0;
public:
Client(boost::asio::ip::tcp::socket&& socket);