From 7097015fa3d2737b2e9438fdba9ec7b8f5630421 Mon Sep 17 00:00:00 2001 From: Dennis Brentjes Date: Mon, 29 Aug 2016 15:35:26 +0200 Subject: Refactored Client to be more reusable. Added UserClient and NodeClient classes to handle communication from and to Clients and Nodes respectively. --- network-handler/userclient.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 network-handler/userclient.cpp (limited to 'network-handler/userclient.cpp') diff --git a/network-handler/userclient.cpp b/network-handler/userclient.cpp new file mode 100644 index 0000000..b35a544 --- /dev/null +++ b/network-handler/userclient.cpp @@ -0,0 +1,12 @@ +#include "userclient.hpp" + +#include + +void UserClient::handle_message(std::vector message) +{ + std::cout << std::string(message.begin(), message.end()); +} + +UserClient::UserClient(boost::asio::ip::tcp::socket&& socket) +: Client(std::move(socket)) +{} -- cgit v1.2.3-70-g09d2