From 88c5130eccd06e63ffca732626c0fb59426743a7 Mon Sep 17 00:00:00 2001 From: Dennis Brentjes Date: Wed, 5 Oct 2016 12:56:52 +0200 Subject: Seperates Nodes and Clients for incoming connections. Created a PrevNode class to reflect the seperation. Made Client movable. Added 2 empty protobuf message that declare what each connecting client is, sent when connected to a node. --- node/node.hpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'node/node.hpp') diff --git a/node/node.hpp b/node/node.hpp index a481c70..a4e21b3 100644 --- a/node/node.hpp +++ b/node/node.hpp @@ -2,6 +2,7 @@ #include "server.hpp" #include "nodeclient.hpp" +#include "prevnode.hpp" #include "nextnode.hpp" #include "api.h" @@ -33,10 +34,12 @@ class Node { boost::asio::io_service io_service; Server server; + std::list purgatory; std::list clients; NodeNetworkSettings network_settings; + PrevNode prev_node; NextNode next_node; Api api; @@ -48,8 +51,13 @@ class Node void start_precomputation(); void start_initialisation(); - void handle_message(std::vector const& message_buffer); void handle_initialization(cmix_proto::Initialization const& init); + void handle_message(std::vector const& message_buffer); + + void handle_imanode(std::list::iterator handle); + void handle_imaclient(std::list::iterator handle); + void handle_message(std::list::iterator handle, std::vector const& message_buffer); + public: /*! -- cgit v1.2.3-70-g09d2