diff options
author | michele papalini <micpapal@cisco.com> | 2019-07-03 10:16:59 +0200 |
---|---|---|
committer | michele papalini <micpapal@cisco.com> | 2019-07-03 10:16:59 +0200 |
commit | 1ace563a5009f4e05bfde9e196d71aadd29c8144 (patch) | |
tree | dc78c52f5fb7e90550580eecf21e59df62e0ab9a | |
parent | 816964180f5fc15c756580fef0173dad55f59933 (diff) |
[HICN-231] fix reinitialization of rtc socket
Change-Id: If8e11556afcd8828cb0aa7759e6c1194a1657f1d
Signed-off-by: michele papalini <micpapal@cisco.com>
-rw-r--r-- | libtransport/src/hicn/transport/interfaces/rtc_socket_producer.h | 2 | ||||
-rw-r--r-- | libtransport/src/hicn/transport/protocols/rtc.cc | 25 | ||||
-rw-r--r-- | libtransport/src/hicn/transport/protocols/rtc.h | 1 |
3 files changed, 8 insertions, 20 deletions
diff --git a/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.h b/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.h index 408ce3ff7..29fd15a4e 100644 --- a/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.h +++ b/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.h @@ -41,7 +41,7 @@ class RTCProducerSocket : public ProducerSocket { void onInterest(Interest::Ptr &&interest) override; private: - void sendNack(const Interest &interest, bool isActvie); + void sendNack(const Interest &interest, bool isActive); void updateStats(uint32_t packet_size, uint64_t now); uint32_t currentSeg_; 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::milliseconds>( - 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<uint32_t> &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 diff --git a/libtransport/src/hicn/transport/protocols/rtc.h b/libtransport/src/hicn/transport/protocols/rtc.h index 3e0ffe6e5..66ad05a88 100644 --- a/libtransport/src/hicn/transport/protocols/rtc.h +++ b/libtransport/src/hicn/transport/protocols/rtc.h @@ -113,7 +113,6 @@ class RTCTransportProtocol : public TransportProtocol, public Reassembly { // packet functions void sendInterest(Name *interest_name, bool rtx); void scheduleNextInterests() override; - void scheduleAppNackRtx(std::vector<uint32_t> &nacks); void addRetransmissions(uint32_t val); void addRetransmissions(uint32_t start, uint32_t stop); void retransmit(bool first_rtx); |