aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport
diff options
context:
space:
mode:
authormichele papalini <micpapal@cisco.com>2019-10-18 13:20:17 +0200
committermichele papalini <micpapal@cisco.com>2019-10-18 13:20:17 +0200
commite829c967195260afe705d2b937fa2df5ce403699 (patch)
treead275f4ebfb3e3aeb9ef99a17183535784b72dca /libtransport
parentbadbec7fcbb0c1fb63a6a1dbfc72ad4ca04c89d6 (diff)
[HICN-338] correctly compute the estimated production rate in rtc socket
Signed-off-by: michele papalini <micpapal@cisco.com> Change-Id: I5ab36c5dde449ff0f3e0372372c09dbb227aecf5
Diffstat (limited to 'libtransport')
-rw-r--r--libtransport/src/hicn/transport/protocols/rtc.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/libtransport/src/hicn/transport/protocols/rtc.cc b/libtransport/src/hicn/transport/protocols/rtc.cc
index ba8f549c3..db36473cb 100644
--- a/libtransport/src/hicn/transport/protocols/rtc.cc
+++ b/libtransport/src/hicn/transport/protocols/rtc.cc
@@ -803,6 +803,9 @@ void RTCTransportProtocol::onContentObject(
avgPacketSize_ = (HICN_ESTIMATED_PACKET_SIZE * avgPacketSize_) +
((1 - HICN_ESTIMATED_PACKET_SIZE) * payload->length());
+ receivedBytes_ += (uint32_t)(content_object->headerSize() +
+ content_object->payloadSize());
+
if (inflightInterests_[pkt].state == sent_) {
inflightInterestsCount_--; // packet sent without timeouts
}
@@ -810,10 +813,7 @@ void RTCTransportProtocol::onContentObject(
if (inflightInterests_[pkt].state == sent_ &&
interestRetransmissions_.find(segmentNumber) ==
interestRetransmissions_.end()) {
- // we count only non retransmitted data in order to take into accunt only
- // the transmition rate of the producer
- receivedBytes_ += (uint32_t)(content_object->headerSize() +
- content_object->payloadSize());
+ // delay stats are computed only for non retransmitted data
updateDelayStats(*content_object);
}