From 76c2fd91a71585bfccf8ae9e30834a37514de24f Mon Sep 17 00:00:00 2001 From: Frederico Linhares Date: Fri, 28 Mar 2025 14:53:08 -0300 Subject: feat Simplify interface for net connections --- src/blu_cat/net/common/connection.hpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/blu_cat/net/common/connection.hpp') diff --git a/src/blu_cat/net/common/connection.hpp b/src/blu_cat/net/common/connection.hpp index c5683cb..bdce8b3 100644 --- a/src/blu_cat/net/common/connection.hpp +++ b/src/blu_cat/net/common/connection.hpp @@ -26,7 +26,6 @@ #include "connection_callback.hpp" #include "message.hpp" -#include "message_callback.hpp" #include "tsqueue.hpp" namespace BluCat::NET @@ -42,7 +41,6 @@ protected: TSQueue messages; Message reading_message; - MessageCallback *message_callback; ConnectionCallback *connection_callback; void @@ -55,11 +53,10 @@ public: bool send(const uint32_t id, const std::vector &msg); - void - read_messages(); + bool + read_message(Message *m); - Connection(MessageCallback *message_callback, - ConnectionCallback *connection_callback, + Connection(ConnectionCallback *connection_callback, asio::io_context &io_context, asio::ip::tcp::socket socket, unsigned long index); -- cgit v1.2.3