aboutsummaryrefslogtreecommitdiff
path: root/node/nextnode.hpp
diff options
context:
space:
mode:
authorDennis Brentjes <d.brentjes@gmail.com>2016-10-05 12:56:52 +0200
committerDennis Brentjes <d.brentjes@gmail.com>2016-10-05 14:12:28 +0200
commit88c5130eccd06e63ffca732626c0fb59426743a7 (patch)
treef9c7c4536bfa50057269c3636baedea3cb859ac1 /node/nextnode.hpp
parentedc3690d62890449df3ae4c14636019bce4833f1 (diff)
downloadcmix-88c5130eccd06e63ffca732626c0fb59426743a7.tar.gz
cmix-88c5130eccd06e63ffca732626c0fb59426743a7.tar.bz2
cmix-88c5130eccd06e63ffca732626c0fb59426743a7.zip
Seperates Nodes and Clients for incoming connections.
Created a PrevNode class to reflect the seperation. Made Client movable. Added 2 empty protobuf message that declare what each connecting client is, sent when connected to a node.
Diffstat (limited to 'node/nextnode.hpp')
-rw-r--r--node/nextnode.hpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/node/nextnode.hpp b/node/nextnode.hpp
index 9601ab5..862ca5c 100644
--- a/node/nextnode.hpp
+++ b/node/nextnode.hpp
@@ -15,12 +15,13 @@
* protobuf messages, This because there are seperate functions for each to type to use.
* And there seems no way to solve this using templates.
*/
-#define MESSAGE_SETTER(T,F,NAME) \
-inline void message_setter(cmix_proto::CMixMessage& m, cmix_proto::T##NAME const& v) { \
- *m.mutable_##F##NAME() = v; \
+#define MESSAGE_SETTER(TYPE, NAME) \
+inline void message_setter(cmix_proto::CMixMessage& m, cmix_proto::TYPE const& v) { \
+ *m.mutable_##NAME() = v; \
} \
-MESSAGE_SETTER(I,i,nitialization)
+MESSAGE_SETTER(Initialization, initialization)
+MESSAGE_SETTER(ImANode, imanode)
#undef MESSAGE_SETTER