From 1ace563a5009f4e05bfde9e196d71aadd29c8144 Mon Sep 17 00:00:00 2001 From: michele papalini Date: Wed, 3 Jul 2019 10:16:59 +0200 Subject: [HICN-231] fix reinitialization of rtc socket Change-Id: If8e11556afcd8828cb0aa7759e6c1194a1657f1d Signed-off-by: michele papalini --- libtransport/src/hicn/transport/protocols/rtc.cc | 25 +++++++----------------- 1 file changed, 7 insertions(+), 18 deletions(-) (limited to 'libtransport/src/hicn/transport/protocols/rtc.cc') diff --git a/libtransport/src/hicn/transport/protocols/rtc.cc b/libtransport/src/hicn/transport/protocols/rtc.cc index b514d0587..5ff0126b0 100644 --- a/libtransport/src/hicn/transport/protocols/rtc.cc +++ b/libtransport/src/hicn/transport/protocols/rtc.cc @@ -90,6 +90,11 @@ void RTCTransportProtocol::reset() { nackedByProducer_.clear(); nackedByProducerMaxSize_ = 512; + nack_timer_used_ = false; + for(int i = 0; i < (1 << default_values::log_2_default_buffer_size); i++){ + inflightInterests_[i] = {0}; + } + // stats receivedBytes_ = 0; sentInterest_ = 0; @@ -173,7 +178,7 @@ void RTCTransportProtocol::updateDelayStats( uint64_t *senderTimeStamp = (uint64_t *)payload->data(); int64_t OWD = std::chrono::duration_cast( - std::chrono::system_clock::now().time_since_epoch()) + std::chrono::steady_clock::now().time_since_epoch()) .count() - *senderTimeStamp; @@ -383,22 +388,6 @@ void RTCTransportProtocol::scheduleNextInterests() { } } -void RTCTransportProtocol::scheduleAppNackRtx(std::vector &nacks) { -#if 0 - for (uint32_t i = 0; i < nacks.size(); i++) { - if (nackedByProducer_.find(nacks[i]) != nackedByProducer_.end()) { - continue; - } - // packetLost_++; - // XXX here I need to avoid the retrasmission for packet that were - // nacked by the network - interestRetransmissions_.push(nacks[i]); - } - - scheduleNextInterests(); -#endif -} - void RTCTransportProtocol::addRetransmissions(uint32_t val) { // add only val in the rtx list addRetransmissions(val, val + 1); @@ -739,4 +728,4 @@ void RTCTransportProtocol::returnContentToApplication( } // end namespace protocol -} // end namespace transport \ No newline at end of file +} // end namespace transport -- cgit 1.2.3-korg