Skip to content
Snippets Groups Projects
Commit 86e28885 authored by Benny Baumann's avatar Benny Baumann
Browse files

chg: Move connection_client ctor/dtor to header

parent 5a1a0d3b
No related branches found
No related tags found
1 merge request!1First unit tests
...@@ -6,15 +6,3 @@ ...@@ -6,15 +6,3 @@
*/ */
#include "net/connection_client.hpp" #include "net/connection_client.hpp"
namespace rmrf::net {
connection_client::connection_client() : in_data_cb{} {
// Nothing to do here
}
inline void connection_client::set_incomming_data_callback(const incomming_data_cb &cb) {
this->in_data_cb = cb;
}
}
...@@ -21,7 +21,7 @@ protected: ...@@ -21,7 +21,7 @@ protected:
incomming_data_cb in_data_cb; incomming_data_cb in_data_cb;
public: public:
connection_client(); connection_client() : in_data_cb{} {};
/** /**
* Use this method to send data to the other endpoint. * Use this method to send data to the other endpoint.
...@@ -33,7 +33,9 @@ public: ...@@ -33,7 +33,9 @@ public:
* called when the client got data to process. * called when the client got data to process.
* @param cb The callback function to register [void(std::string data)] * @param cb The callback function to register [void(std::string data)]
*/ */
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;
};
}; };
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment