aboutsummaryrefslogtreecommitdiff
path: root/node/node.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'node/node.hpp')
-rw-r--r--node/node.hpp26
1 files changed, 17 insertions, 9 deletions
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<Receiver> purgatory;
- typedef std::map<std::string, SenderReceiver> ClientMap;
- ClientMap clients;
+ typedef std::list<Receiver> Purgatory;
+ Purgatory purgatory;
+
+ typedef std::map<std::string, SenderReceiver> ClientConnections;
+ ClientConnections clients;
+ typedef std::map<std::string, CMixClientData> 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<Receiver>::iterator handle);
- void handle_imaclient(std::list<Receiver>::iterator handle, cmix_proto::ImAClient c);
- void handle_message(std::list<Receiver>::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:
/*!