diff options
| author | Dennis Brentjes <d.brentjes@gmail.com> | 2016-09-22 16:14:01 +0200 |
|---|---|---|
| committer | Dennis Brentjes <d.brentjes@gmail.com> | 2016-09-22 16:14:01 +0200 |
| commit | 7267afd28b9e00864274f55f7a82d4943bade1f8 (patch) | |
| tree | e2733fc0de53d6db85c2c1fca4bf2067add92042 /node/node.hpp | |
| parent | 8065e1bf2229294fea502226962bd66d37ff81ce (diff) | |
| download | cmix-7267afd28b9e00864274f55f7a82d4943bade1f8.tar.gz cmix-7267afd28b9e00864274f55f7a82d4943bade1f8.tar.bz2 cmix-7267afd28b9e00864274f55f7a82d4943bade1f8.zip | |
Adds a NextNode class and prepares the Node to start network initialization.
Diffstat (limited to 'node/node.hpp')
| -rw-r--r-- | node/node.hpp | 21 |
1 files changed, 20 insertions, 1 deletions
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 <boost/asio/io_service.hpp> #include <list> +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<NodeClient> 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); }; |
