Skip to content
Snippets Groups Projects
Commit 77ee388e authored by Jarrod Pas's avatar Jarrod Pas
Browse files

Re-implement flooding

parent e26d4bfb
No related branches found
No related tags found
2 merge requests!3Version 0.2,!1Full rewrite
......@@ -400,6 +400,19 @@ class Node:
)
class FloodingNode(Node):
"""Node which forwards through flooding."""
def forward(self, packet):
"""Forwards to all neighbour nodes."""
forward = {
neighbour: 'flood'
for neighbour in self.neighbours
}
return forward
class EpidemicNode(Node):
"""Node which forwards epidemically."""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment