diff options
Diffstat (limited to 'node/node.hpp')
| -rw-r--r-- | node/node.hpp | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/node/node.hpp b/node/node.hpp index 44e379f..9f1f3a2 100644 --- a/node/node.hpp +++ b/node/node.hpp @@ -1,9 +1,7 @@ #pragma once #include "server.hpp" -#include "nodeclient.hpp" -#include "prevnode.hpp" -#include "nextnode.hpp" +#include "protobufclient.hpp" #include "api.h" @@ -33,13 +31,13 @@ class Node { boost::asio::io_service io_service; Server server; - std::list<Client> purgatory; - std::list<Client> clients; + std::list<Receiver> purgatory; + std::list<SenderReceiver> clients; NodeNetworkSettings network_settings; - PrevNode prev_node; - NextNode next_node; + Receiver prev_node; + Sender next_node; Api api; KeyPair keypair; @@ -50,16 +48,14 @@ class Node void start_precomputation(); void start_initialisation(); - cmix_proto::CMixMessage parse_cmix_message(std::vector<uint8_t> const& buffer); - void handle_initialization(cmix_proto::Initialization const& init); - void handle_node_message(std::vector<uint8_t> const& message_buffer); + void handle_node_message(cmix_proto::CMixMessage message); - void handle_client_message(std::list<Client>::iterator handle, std::vector<uint8_t> const& message_buffer); + void handle_client_message(std::list<SenderReceiver>::iterator handle, cmix_proto::CMixMessage message); - void handle_imanode(std::list<Client>::iterator handle); - void handle_imaclient(std::list<Client>::iterator handle); - void handle_message(std::list<Client>::iterator handle, std::vector<uint8_t> const& message_buffer); + void handle_imanode(std::list<Receiver>::iterator handle); + void handle_imaclient(std::list<Receiver>::iterator handle); + void handle_message(std::list<ProtobufClient<Receive>>::iterator handle, cmix_proto::CMixMessage message); public: |
