From 2626851f4846829e7cfa993a75dfbeab17fc9371 Mon Sep 17 00:00:00 2001 From: Mauro Sardara Date: Sun, 19 May 2019 11:31:41 +0200 Subject: [HICN-201] Do not reply to interests requesting non-existent data. Change-Id: I7acd1d86e71f3670068b102bd24cd475d8092fb1 Signed-off-by: Mauro Sardara --- apps/http-proxy/src/IcnReceiver.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'apps/http-proxy/src/IcnReceiver.h') diff --git a/apps/http-proxy/src/IcnReceiver.h b/apps/http-proxy/src/IcnReceiver.h index 61ca4333a..ea4eeb010 100644 --- a/apps/http-proxy/src/IcnReceiver.h +++ b/apps/http-proxy/src/IcnReceiver.h @@ -28,6 +28,10 @@ namespace transport { class AsyncConsumerProducer { + using SegmentProductionPair = std::pair; + using ResponseInfoMap = std::unordered_map; + using RequestQueue = std::queue; + public: explicit AsyncConsumerProducer(const std::string& prefix, std::string& ip_address, std::string& port, @@ -63,8 +67,11 @@ class AsyncConsumerProducer { // std::unordered_map> // connection_map_; ATSConnector connector_; - std::unordered_map chunk_number_map_; - std::queue response_name_queue_; + + // ResponseInfoMap --> max_seq_number + bool indicating whether request is in + // production + ResponseInfoMap chunk_number_map_; + RequestQueue response_name_queue_; }; } // namespace transport -- cgit 1.2.3-korg