Research Article
A Probabilistic Spray-and-Wait Routing Algorithm Based on Node Interest Preference in Delay Tolerant Networks
Algorithm 1
Pseudocode for buffer management.
| Input: | | the node that is ready to receive the message | | , number of copies of that need to forward to | | , set of messages need to forward to | | 1: ifthen | | 2: | | 3: for each message in do | | 4: if | | 5: then | | 6: delete the messages with smallest in | | until has enough buffer size to receive | | 7: end if | | 8: forward to | | 9: end for | | 10: end if |
|