My scenario only includes two nodes.
The
goal of this task is to select a forwarder from two nodes. That means,
at an instant 't' only one node (node1 or node2) will send its bundles
to its neighboring nodes.
To do that, I use timers 'T1' and 'T2' for node1 and node2, respectively.
At
the same time 't', both nodes initiate their timers. Suppose that T1
> T2, that means node1 should be the forwarder and node2 will be a
receiver.
When T1 expires, node1 check if
it is receiving bundles from neighbors ==> No, Then node1 sends its
bundles for its neighbors.
When T2 expires, node2 check if
it is receiving bundles from neighbors ==> Yes, Then node2 does not
send its bundles and act as receiver.
I didn't find a solution to make that, so I thought of another Idea 2/ which is to make Only one connection at a time using the bundle reject option.
Thus, when a node is receiving/sending bundles, it rejects other bundles.
Best Regards,
Farouk