aboutsummaryrefslogtreecommitdiff
path: root/client/node.cpp
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 /client/node.cpp
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 'client/node.cpp')
-rw-r--r--client/node.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/client/node.cpp b/client/node.cpp
deleted file mode 100644
index 46375f4..0000000
--- a/client/node.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-#include "node.hpp"
-
-#include "logging.hpp"
-
-using namespace boost::asio::ip;
-
-Node::Node(tcp::socket&& socket)
-: client(std::move(socket))
-{}
-
-void Node::async_connect(std::string next_host, std::string next_port, std::function<void ()> on_connect)
-{
- client.async_connect(next_host, next_port, on_connect);
-}
-
-void Node::receive(std::function<void (const std::vector<uint8_t>&)> receive_handler) {
- client.receive(receive_handler);
-}
-
-void Node::close()
-{
- client.close();
-}