Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
added support for test s4u-network-ns3-wifi
[simgrid.git] / examples / s4u / dht-kademlia / node.hpp
index ab64fa72527a25cc975fd77a24d03e7e2802b1ca..f65106c77a8adadea5b6432fb672201d4b83c4c5 100644 (file)
@@ -24,17 +24,17 @@ public:
   explicit Node(unsigned int node_id) : id_(node_id), table(node_id) {}
   Node(const Node&) = delete;
   Node& operator=(const Node&) = delete;
-  unsigned int getId() { return id_; }
+  unsigned int getId() const { return id_; }
 
   bool join(unsigned int known_id);
-  void sendFindNode(unsigned int id, unsigned int destination);
-  unsigned int sendFindNodeToBest(const Answer* node_list);
+  void sendFindNode(unsigned int id, unsigned int destination) const;
+  unsigned int sendFindNodeToBest(const Answer* node_list) const;
   void routingTableUpdate(unsigned int id);
   Answer* findClosest(unsigned int destination_id);
   bool findNode(unsigned int id_to_find, bool count_in_stats);
   void randomLookup();
   void handleFindNode(const Message* msg);
-  void displaySuccessRate();
+  void displaySuccessRate() const;
 };
 } // namespace kademlia
 // identifier functions