From 88c5130eccd06e63ffca732626c0fb59426743a7 Mon Sep 17 00:00:00 2001 From: Dennis Brentjes Date: Wed, 5 Oct 2016 12:56:52 +0200 Subject: Seperates Nodes and Clients for incoming connections. Created a PrevNode class to reflect the seperation. Made Client movable. Added 2 empty protobuf message that declare what each connecting client is, sent when connected to a node. --- libcmix-network/client.hpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'libcmix-network/client.hpp') diff --git a/libcmix-network/client.hpp b/libcmix-network/client.hpp index 51dfa6f..dc3787d 100644 --- a/libcmix-network/client.hpp +++ b/libcmix-network/client.hpp @@ -31,7 +31,7 @@ protected: boost::asio::ip::tcp::socket socket; private: - boost::asio::streambuf buffer; + std::unique_ptr buffer; OnDoneFT done; @@ -51,6 +51,16 @@ public: Client(boost::asio::ip::tcp::socket&& socket); ~Client(); + /*! + * \brief Move constructor for Client. + */ + Client(Client&&) = default; + + /*! + * \brief Move assignment for Client. + */ + Client& operator=(Client&&) = default; + /*! * \brief async_connect Asynchronously connects to next_host:port and calls on_connect * \param next_host The host to connect to -- cgit v1.2.3-70-g09d2