From eebd271bb1e3ab0d25f48db07a1a3f1154215bc7 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 30 Jan 2017 15:40:22 -0800 Subject: Implement cross cluster sharing of network configs to make clusters able to actually join networks. --- node/Cluster.hpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'node/Cluster.hpp') diff --git a/node/Cluster.hpp b/node/Cluster.hpp index dafbf425..aba3b8a9 100644 --- a/node/Cluster.hpp +++ b/node/Cluster.hpp @@ -216,14 +216,13 @@ public: /** * Replicate a network config for a network we belong to: - * <[8] 64-bit network ID> - * <[2] 16-bit length of network config> - * <[...] serialized network config> + * <[...] network config chunk> * * This is used by clusters to avoid every member having to query * for the same netconf for networks all members belong to. * - * TODO: not implemented yet! + * The first field of a network config chunk is the network ID, + * so this can be checked to look up the network on receipt. */ CLUSTER_MESSAGE_NETWORK_CONFIG = 7 }; @@ -267,6 +266,14 @@ public: */ void broadcastHavePeer(const Identity &id); + /** + * Broadcast a network config chunk to other members of cluster + * + * @param chunk Chunk data + * @param len Length of chunk + */ + void broadcastNetworkConfigChunk(const void *chunk,unsigned int len); + /** * Send this packet via another node in this cluster if another node has this peer * -- cgit v1.2.3