[HICN-411] Change how manifests are requested 01/23601/2
authorOlivier Roques <olvrqs@gmail.com>
Thu, 21 Nov 2019 15:47:00 +0000 (15:47 +0000)
committerOlivier Roques <olvrqs@gmail.com>
Fri, 22 Nov 2019 12:33:01 +0000 (12:33 +0000)
commitd41e15b580287a26f6b58241eaec7957ee336050
tree9fa19199fcc340eec582353986cc354660bac130
parent4d593c09d9cc1496788f7953de25832193064103
[HICN-411] Change how manifests are requested

This patch introduces a new way of requesting manifests such that
all the segments they contain fill the current transport window.

When a manifest (M) is received, we compute
L = last_segment_requested + current_window_size.
L is therefore equal or greater than the last segment of the
current window.

Then we compare L to the suffix of the next manifest that will
be (potentially) requested.

If L > next_manifest, it means that the last segment of the window is
greater than the first segment contained in the next manifest.
Therefore we request manifests until L <= next_manifest, ie until the
manifests would cover the entire window.

If L <= next_manifest, then all the manifests that were requested
already cover the window, so there's no need to request more. However
if the next manifest immediately follows the current one (M), we still
need to request it so that the content suffix queue is correctly
updated.

Signed-off-by: Olivier Roques <olvrqs@gmail.com>
Change-Id: I71a5a0031cd783277d0aa59fd68d5d7bf64fe6ae
libtransport/src/hicn/transport/protocols/manifest_indexing_manager.cc
libtransport/src/hicn/transport/protocols/manifest_indexing_manager.h
libtransport/src/hicn/transport/utils/suffix_strategy.h