aboutsummaryrefslogtreecommitdiff
path: root/libcmix-common/sender.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcmix-common/sender.hpp')
-rw-r--r--libcmix-common/sender.hpp31
1 files changed, 31 insertions, 0 deletions
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<CMixProtoFunctor>
friend SenderReceiver;
using ProtobufClient::ProtobufClient;
+ using ProtobufClient::operator=;
using ProtobufClient::async_send;
@@ -36,3 +37,33 @@ struct Sender : private ProtobufClient<CMixProtoFunctor>
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<CMixProtoFunctor>
+{
+ /*!
+ * 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;
+};