diff --git a/src/net/connection_client.cpp b/src/net/connection_client.cpp index ca1ca07ab4ee70ff0e6e6385762e069a41e302ce..d060b0a95bd7fc688a7875f7ad8d5f7cb600012f 100644 --- a/src/net/connection_client.cpp +++ b/src/net/connection_client.cpp @@ -6,15 +6,3 @@ */ #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; -} - -} diff --git a/src/net/connection_client.hpp b/src/net/connection_client.hpp index 8036375f33911da9b6af924dbb41bdbd6f09b3af..c64aca9e7b23b60f481c4317d470359b991b4440 100644 --- a/src/net/connection_client.hpp +++ b/src/net/connection_client.hpp @@ -21,7 +21,7 @@ protected: incomming_data_cb in_data_cb; public: - connection_client(); + connection_client() : in_data_cb{} {}; /** * Use this method to send data to the other endpoint. @@ -33,7 +33,9 @@ public: * called when the client got data to process. * @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; + }; }; }