aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/hicn/transport/protocols/rtc.h
diff options
context:
space:
mode:
authormichele papalini <micpapal@cisco.com>2019-10-25 15:42:20 +0200
committerMauro Sardara <msardara@cisco.com>2019-10-30 14:46:41 +0000
commit0d60d36eaf9d456ad61b453c0660b88d0ccd3b09 (patch)
treea61d37b7e6645064637d1314fae35929489e72a0 /libtransport/src/hicn/transport/protocols/rtc.h
parent3d674d504306489c4d845260f058ce44aa083f33 (diff)
[HICN-360] retransmit pending interests when all of them get lost without wainting for the timeout
Signed-off-by: michele papalini <micpapal@cisco.com> Change-Id: I84074d106bf2cfd3f7a3fb02947198179b0b5b74
Diffstat (limited to 'libtransport/src/hicn/transport/protocols/rtc.h')
-rw-r--r--libtransport/src/hicn/transport/protocols/rtc.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/libtransport/src/hicn/transport/protocols/rtc.h b/libtransport/src/hicn/transport/protocols/rtc.h
index 7927e3969..908be017a 100644
--- a/libtransport/src/hicn/transport/protocols/rtc.h
+++ b/libtransport/src/hicn/transport/protocols/rtc.h
@@ -123,6 +123,7 @@ class RTCTransportProtocol : public TransportProtocol, public Reassembly {
// packet functions
void sendInterest(Name *interest_name, bool rtx);
void scheduleNextInterests() override;
+ void sentinelTimer();
void addRetransmissions(uint32_t val);
void addRetransmissions(uint32_t start, uint32_t stop);
uint64_t retransmit();
@@ -163,6 +164,17 @@ class RTCTransportProtocol : public TransportProtocol, public Reassembly {
uint64_t lastReceivedTime_; //time at which we recevied the
//lastReceived_ packet
+ //sentinel
+ //if all packets in the window get lost we need something that
+ //wakes up our consumer socket. Interest timeouts set to 1 sec
+ //expire too late. This timers expire much sooner and if it
+ //detects that all the interest in the window may be lost
+ //it sends all of them again
+ std::unique_ptr<asio::steady_timer> sentinel_timer_;
+ uint64_t lastEvent_; //time at which we removed a pending
+ //interest from the window
+ std::unordered_map<uint32_t, uint8_t> packets_in_window_;
+
//rtt probes
//the RTC transport tends to overestimate the RTT
//du to the production time on the server side
@@ -188,6 +200,7 @@ class RTCTransportProtocol : public TransportProtocol, public Reassembly {
double avgPacketSize_;
bool gotNack_;
uint32_t gotFutureNack_;
+ uint32_t rounds_;
uint32_t roundsWithoutNacks_;
//we keep track of up two paths (if only one path is in use