From bbb74d387bf983351d1d4106d31f0c8068ce52ca Mon Sep 17 00:00:00 2001 From: michele papalini Date: Mon, 18 Feb 2019 11:18:03 +0100 Subject: [HICN-67] add interest callback in RTC producer socket Change-Id: I8b2075d71f272956e213b0b1505d7af46844d387 Signed-off-by: michele papalini --- libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libtransport') 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) * -- cgit 1.2.3-korg