diff options
author | michele papalini <micpapal@cisco.com> | 2019-10-10 17:57:10 +0200 |
---|---|---|
committer | michele papalini <micpapal@cisco.com> | 2019-10-10 17:57:10 +0200 |
commit | 691b16435dbc0b8e53376a62683e792d0f25cc66 (patch) | |
tree | bcd2e6c4b1ca3da483184196e196c34c5be7266a /libtransport/src/hicn/transport/interfaces/rtc_socket_producer.h | |
parent | 5891bc7dc9d5538614f23dc176f40f6e5d18efc2 (diff) |
[HICN-317] schedule rounds using timers in rtc producer
Signed-off-by: michele papalini <micpapal@cisco.com>
Change-Id: I4a5fe9c954713dc266e7aeb5f461b460d508d8e3
Diffstat (limited to 'libtransport/src/hicn/transport/interfaces/rtc_socket_producer.h')
-rw-r--r-- | libtransport/src/hicn/transport/interfaces/rtc_socket_producer.h | 12 |
1 files changed, 7 insertions, 5 deletions
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<uint32_t> producedBytes_; + std::atomic<uint32_t> producedPackets_; std::atomic<uint32_t> bytesProductionRate_; std::atomic<uint32_t> packetsProductionRate_; uint32_t perSecondFactor_; - uint64_t lastStats_; + + std::unique_ptr<asio::steady_timer> round_timer_; // cache for the received interests // this map maps the expiration time of an interest to |