From c9082aa07394e15cd800bd5ad396c37a2334c98d Mon Sep 17 00:00:00 2001 From: Dennis Brentjes Date: Sun, 16 Oct 2016 21:38:43 +0200 Subject: made the code base more consistent and fixes some small TU issues. --- node/node.hpp | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'node/node.hpp') diff --git a/node/node.hpp b/node/node.hpp index 76f3c0d..9dfc343 100644 --- a/node/node.hpp +++ b/node/node.hpp @@ -31,12 +31,20 @@ struct NodeNetworkSettings { */ class Node { + struct CMixClientData { + SharedKey shared_value; + }; + boost::asio::io_service io_service; Server server; - std::list purgatory; - typedef std::map ClientMap; - ClientMap clients; + typedef std::list Purgatory; + Purgatory purgatory; + + typedef std::map ClientConnections; + ClientConnections clients; + typedef std::map ClientData; + ClientData data; NodeNetworkSettings network_settings; @@ -60,13 +68,13 @@ class Node void handle_node_bye(cmix_proto::Bye); void handle_node_message(cmix_proto::CMixMessage message); - void handle_client_keyexchange(ClientMap::key_type handle, cmix_proto::KeyExchange ke); - void handle_client_bye(ClientMap::key_type handle, cmix_proto::Bye); - void handle_client_message(ClientMap::key_type handle, cmix_proto::CMixMessage message); + void handle_client_keyexchange(ClientConnections::key_type handle, cmix_proto::KeyExchange ke); + void handle_client_bye(ClientConnections::key_type handle, cmix_proto::Bye); + void handle_client_message(ClientConnections::key_type handle, cmix_proto::CMixMessage message); - void handle_imanode(std::list::iterator handle); - void handle_imaclient(std::list::iterator handle, cmix_proto::ImAClient c); - void handle_message(std::list::iterator handle, cmix_proto::CMixMessage message); + void handle_imanode(Purgatory::iterator handle); + void handle_imaclient(Purgatory::iterator handle, cmix_proto::ImAClient c); + void handle_message(Purgatory::iterator handle, cmix_proto::CMixMessage message); public: /*! -- cgit v1.2.3-70-g09d2