From d44283ec2e3b50d7a6e892268a7fd052630bb8ce Mon Sep 17 00:00:00 2001
From: Doralitze <doralitze@chaotikum.org>
Date: Wed, 14 Jul 2021 12:43:31 +0200
Subject: [PATCH] add: Document abstract connection clients

---
 src/net/connection_client.hpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/net/connection_client.hpp b/src/net/connection_client.hpp
index c64aca9..61fcbb9 100644
--- a/src/net/connection_client.hpp
+++ b/src/net/connection_client.hpp
@@ -15,6 +15,10 @@ namespace rmrf::net {
 
 class connection_client : public std::enable_shared_from_this<connection_client> {
 public:
+    /**
+      * This function type accepts a reference to the incomming data string which it may not alter
+      * and may not return any data.
+      */
     typedef std::function<void(const std::string&)> incomming_data_cb;
 
 protected:
@@ -25,6 +29,7 @@ public:
 
     /**
      * Use this method to send data to the other endpoint.
+     * @param data The data to send
      */
     virtual void write_data(const std::string& data) = 0;
 
@@ -33,7 +38,7 @@ public:
      * called when the client got data to process.
      * @param cb The callback function to register [void(std::string data)]
      */
-    inline void set_incomming_data_callback(const incomming_data_cb &cb) {
+    inline void set_incomming_data_callback(const incomming_data_cb& cb) {
         this->in_data_cb = cb;
     };
 };
-- 
GitLab