From bc39d05453340257fff986edfdd728f2a89d13ad Mon Sep 17 00:00:00 2001 From: Dennis Brentjes Date: Thu, 1 Dec 2016 14:34:18 +0100 Subject: Removed a large chunk of code duplication in the network code. --- libcmix-network/client.hpp | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) (limited to 'libcmix-network/client.hpp') diff --git a/libcmix-network/client.hpp b/libcmix-network/client.hpp index b43f32b..7b2b16f 100644 --- a/libcmix-network/client.hpp +++ b/libcmix-network/client.hpp @@ -23,11 +23,13 @@ */ /*! - * \brief The Client class + * \brief Forward decl for the friend decleration in BaseClient; */ - struct SSLClient; +/*! + * \brief The BaseClient class takes care of all ssl agnostic operations. + */ template class BaseClient { friend SSLClient; @@ -209,25 +211,14 @@ public: } }; -struct Client : private BaseClient { - - using BaseClient::BaseClient; - using BaseClient::operator=; - - using BaseClient::async_receive; - - using BaseClient::async_send; - - using BaseClient::async_connect; - - using BaseClient::close; - - using BaseClient::on_done; - - using BaseClient::is_open; - -}; +/*! + * \brief Conveniance wrapper around BaseClient for non SSL sockets. + */ +using Client = BaseClient; +/*! + * \brief The SSLClient struct A wrapper around BaseClient that takes care of some of the SSL specific things. + */ struct SSLClient : private BaseClient> { using BaseClient::BaseClient; -- cgit v1.2.3-70-g09d2