void GetNodesReply(RpcMail mail,IEndPoint ep, NodeId id, Dictionary<NodeId, List<IEndPoint>> nodes) { log.Info ("GetNodesReply", ep, id, nodes.Count); lock (nodeToMachine) { Add (ep, id); foreach (var kvp in nodes) foreach (var v in kvp.Value) Add (v, kvp.Key); } }
void GetNodes(RpcMail mail, IEndPoint ep) { log.Info("GetNodes " + ep); lock(nodeToMachine) Node.Reply(mail,ep, Node.Id, nodeToMachine.ToDictionary(n=>n.Key,n=>n.Value)); }