From 510ce3bec7915a790fbf75ace5521e437d9d416a Mon Sep 17 00:00:00 2001 From: Dennis Brentjes Date: Fri, 21 Oct 2016 14:01:26 +0200 Subject: Adds SSL connections between nodes. --- libcmix-common/sender.hpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'libcmix-common/sender.hpp') diff --git a/libcmix-common/sender.hpp b/libcmix-common/sender.hpp index ea16a81..c722e30 100644 --- a/libcmix-common/sender.hpp +++ b/libcmix-common/sender.hpp @@ -25,6 +25,7 @@ struct Sender : private ProtobufClient friend SenderReceiver; using ProtobufClient::ProtobufClient; + using ProtobufClient::operator=; using ProtobufClient::async_send; @@ -36,3 +37,33 @@ struct Sender : private ProtobufClient using ProtobufClient::is_open; }; + +/*! + * \brief forward declaration for SenderReceiver to allow for the friend declaration. + */ +struct SSLSenderReceiver; + +/*! + * \brief The Sender struct is a shim around ProtobufClient and only exposes things needed + * for sending messages. + */ +struct SSLSender : private SSLProtobufClient +{ + /*! + * The friend declaration that allows for the Sender to be upgraded to a SenderReceiver. + */ + friend SSLSenderReceiver; + + using SSLProtobufClient::SSLProtobufClient; + using SSLProtobufClient::operator=; + + using SSLProtobufClient::async_send; + + using SSLProtobufClient::async_connect; + + using SSLProtobufClient::close; + + using SSLProtobufClient::on_done; + + using SSLProtobufClient::is_open; +}; -- cgit v1.2.3-70-g09d2