Skip to content
Snippets Groups Projects

Feature #589 remember multicast recipients

5 files
+ 81
1
Compare changes
  • Side-by-side
  • Inline

Files

+ 12
1
@@ -75,7 +75,8 @@ public class MulticastMessage extends Message {
}
/**
* Gets the addresses of all group members that haven't been passed on this message copy's path so far.
* Gets the addresses of all group members that neither have been passed on this message copy's path before nor
* have received a direct copy of this message copy.
*
* @return Addresses of all group members that haven't been reached so far.
*/
@@ -90,6 +91,16 @@ public class MulticastMessage extends Message {
}
/**
* Adds a {@link DTNHost} to reached recipients if it is a final recipient of the message.
* @param host {@link DTNHost} to add.
*/
public void addReachedHost(DTNHost host) {
if (this.isFinalRecipient(host)) {
this.reachedRecipients.add(host.getAddress());
}
}
/**
* Determines whether the provided node is a final recipient of the message.
* @param host Node to check.
* @return Whether the node is a final recipient of the message.
Loading