From 7bca48bc5b5e37a3a8b0b23e57b88d069fa50589 Mon Sep 17 00:00:00 2001 From: Dennis Brentjes Date: Wed, 12 Oct 2016 14:26:12 +0200 Subject: Major network rewrite. One generic class has been introduced to handle all connection types. Typedefs provide Sender Receiver and SenderReceiver types, which limit the functionality of the types. As to not accidentally communicate with the wrong node about things. --- client/cmixclient.hpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'client/cmixclient.hpp') diff --git a/client/cmixclient.hpp b/client/cmixclient.hpp index 5c6405a..056e2b3 100644 --- a/client/cmixclient.hpp +++ b/client/cmixclient.hpp @@ -1,6 +1,6 @@ #pragma once -#include "node.hpp" +#include "protobufclient.hpp" #include "api.h" #include "logging.hpp" @@ -21,7 +21,7 @@ class CMixClient { boost::asio::io_service io_service; std::vector network_details; - std::vector network_connections; + std::vector> network_connections; Api api; KeyPair keypair; @@ -31,14 +31,13 @@ class CMixClient { void initialize_connections(); - cmix_proto::CMixMessage parse_cmix_message(std::vector const& buffer); - void handle_key_exchange(int node_id, cmix_proto::KeyExchange const& ke); - void handle_message(int node_id, std::vector const& message_buffer); + void handle_message(int node_id, cmix_proto::CMixMessage message); public: CMixClient(std::vector details); + ~CMixClient(); void run(); }; \ No newline at end of file -- cgit v1.2.3-70-g09d2