aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/hicn
diff options
context:
space:
mode:
authormichele papalini <micpapal@cisco.com>2019-02-18 11:18:03 +0100
committermichele papalini <micpapal@cisco.com>2019-02-18 11:18:03 +0100
commitbbb74d387bf983351d1d4106d31f0c8068ce52ca (patch)
tree7841876eb084d85b3d8873b85c341a22168dbeb1 /libtransport/src/hicn
parent7d2b217bd01a8da1a2ac57aaad59b3179c7af916 (diff)
[HICN-67] add interest callback in RTC producer socket
Change-Id: I8b2075d71f272956e213b0b1505d7af46844d387 Signed-off-by: michele papalini <micpapal@cisco.com>
Diffstat (limited to 'libtransport/src/hicn')
-rw-r--r--libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc b/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc
index 740e03c3c..ede1ff247 100644
--- a/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc
+++ b/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc
@@ -145,9 +145,12 @@ void RTCProducerSocket::onInterest(Interest::Ptr &&interest) {
uint32_t lifetime = interest->getLifetime();
uint32_t max_gap;
- // XXX
+ if (on_interest_input_ != VOID_HANDLER) {
+ on_interest_input_(*this, *interest);
+ }
+
// packetsProductionRate_ is modified by another thread in updateStats
- // this should be safe since I just read here. but, you never know.
+ // this should be safe since I just read here.
max_gap = (uint32_t)floor(
(double)((double)((double)lifetime * INTEREST_LIFETIME_REDUCTION_FACTOR /
1000.0) *