aboutsummaryrefslogtreecommitdiff
path: root/node/prevnode.hpp
diff options
context:
space:
mode:
authorDennis Brentjes <d.brentjes@gmail.com>2016-10-12 14:26:12 +0200
committerDennis Brentjes <d.brentjes@gmail.com>2016-10-12 14:26:12 +0200
commit7bca48bc5b5e37a3a8b0b23e57b88d069fa50589 (patch)
tree47cd62512e631a064852015c65bb1965bc72414a /node/prevnode.hpp
parent0fb433690c0ca5f9561fe9e2e973e2cd61b873ba (diff)
downloadcmix-7bca48bc5b5e37a3a8b0b23e57b88d069fa50589.tar.gz
cmix-7bca48bc5b5e37a3a8b0b23e57b88d069fa50589.tar.bz2
cmix-7bca48bc5b5e37a3a8b0b23e57b88d069fa50589.zip
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.
Diffstat (limited to 'node/prevnode.hpp')
-rw-r--r--node/prevnode.hpp42
1 files changed, 0 insertions, 42 deletions
diff --git a/node/prevnode.hpp b/node/prevnode.hpp
deleted file mode 100644
index 6a6b431..0000000
--- a/node/prevnode.hpp
+++ /dev/null
@@ -1,42 +0,0 @@
-#pragma once
-
-#include "client.hpp"
-
-#include "cmix.pb.h"
-
-#include <boost/asio/ip/tcp.hpp>
-
-/*!
- * \file
- */
-
-/*!
- * \brief The PrevNode class represents the previous node in the network, will only be received from.
- */
-class PrevNode
-{
- Client client;
-public:
- /*!
- * \brief PrevNode
- * \param socket an rvalue reference to the socket it takes ownership and uses to communicate with the previous node in the network.
- */
- PrevNode(Client&& socket);
-
- /*!
- * \brief PrevNode move assignment operator.
- */
- PrevNode& operator=(PrevNode&&) = default;
-
- /*!
- * \brief receive Forwards a receive request to the client.
- * \param receive_handler The function to call with the received data.
- */
- void receive(std::function<void(std::vector<uint8_t> const&)> receive_handler);
-
- /*!
- * \brief close This function closes the underlying socket connection.
- */
- void close();
-};
-