From 691b16435dbc0b8e53376a62683e792d0f25cc66 Mon Sep 17 00:00:00 2001 From: michele papalini Date: Thu, 10 Oct 2019 17:57:10 +0200 Subject: [HICN-317] schedule rounds using timers in rtc producer Signed-off-by: michele papalini Change-Id: I4a5fe9c954713dc266e7aeb5f461b460d508d8e3 --- .../src/hicn/transport/interfaces/rtc_socket_producer.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'libtransport/src/hicn/transport/interfaces/rtc_socket_producer.h') diff --git a/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.h b/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.h index 62aa7a296..a2540ceef 100644 --- a/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.h +++ b/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.h @@ -42,20 +42,22 @@ class RTCProducerSocket : public ProducerSocket { private: void sendNack(uint32_t sequence); - void updateStats(uint32_t packet_size, uint64_t now); - void scheduleTimer(uint64_t wait); + void updateStats(); + void scheduleCacheTimer(uint64_t wait); + void scheduleRoundTimer(); void interestCacheTimer(); uint32_t currentSeg_; uint32_t prodLabel_; uint16_t headerSize_; Name flowName_; - uint32_t producedBytes_; - uint32_t producedPackets_; + std::atomic producedBytes_; + std::atomic producedPackets_; std::atomic bytesProductionRate_; std::atomic packetsProductionRate_; uint32_t perSecondFactor_; - uint64_t lastStats_; + + std::unique_ptr round_timer_; // cache for the received interests // this map maps the expiration time of an interest to -- cgit 1.2.3-korg