From 7267afd28b9e00864274f55f7a82d4943bade1f8 Mon Sep 17 00:00:00 2001 From: Dennis Brentjes Date: Thu, 22 Sep 2016 16:14:01 +0200 Subject: Adds a NextNode class and prepares the Node to start network initialization. --- node/node.hpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'node/node.hpp') diff --git a/node/node.hpp b/node/node.hpp index 7d30188..9e321df 100644 --- a/node/node.hpp +++ b/node/node.hpp @@ -2,20 +2,39 @@ #include "server.hpp" #include "nodeclient.hpp" +#include "nextnode.hpp" + +#include "api.h" +#include "curve25519.h" #include #include +struct NodeNetworkSettings { + bool is_first; + std::string next_host; + std::string next_port; +}; + class Node { boost::asio::io_service io_service; Server server; std::list clients; + NextNode next_node; + + Api api; + KeyPair keypair; + void accept_handler(boost::asio::ip::tcp::socket&& socket); + void start_initialisation() { + + } + public: - Node(ListenSettings const& listen_settings); + Node(ListenSettings const& listen_settings, NodeNetworkSettings network_settings); }; -- cgit v1.2.3-70-g09d2