summaryrefslogtreecommitdiffstats
path: root/apps/http-proxy/src/IcnReceiver.h
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2019-05-19 11:31:41 +0200
committerMauro Sardara <msardara@cisco.com>2019-05-19 16:03:13 +0200
commit2626851f4846829e7cfa993a75dfbeab17fc9371 (patch)
treee0ce042c8993f524f57ee6bdcc2f6c00cc166505 /apps/http-proxy/src/IcnReceiver.h
parentfb3e2a7531099857d19dba2f244fb7d0ca6b828d (diff)
[HICN-201] Do not reply to interests requesting non-existent data.
Change-Id: I7acd1d86e71f3670068b102bd24cd475d8092fb1 Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'apps/http-proxy/src/IcnReceiver.h')
-rw-r--r--apps/http-proxy/src/IcnReceiver.h11
1 files changed, 9 insertions, 2 deletions
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<uint32_t, bool>;
+ using ResponseInfoMap = std::unordered_map<core::Name, SegmentProductionPair>;
+ using RequestQueue = std::queue<interface::PublicationOptions>;
+
public:
explicit AsyncConsumerProducer(const std::string& prefix,
std::string& ip_address, std::string& port,
@@ -63,8 +67,11 @@ class AsyncConsumerProducer {
// std::unordered_map<core::Name, std::shared_ptr<ATSConnector>>
// connection_map_;
ATSConnector connector_;
- std::unordered_map<core::Name, uint32_t> chunk_number_map_;
- std::queue<interface::PublicationOptions> response_name_queue_;
+
+ // ResponseInfoMap --> max_seq_number + bool indicating whether request is in
+ // production
+ ResponseInfoMap chunk_number_map_;
+ RequestQueue response_name_queue_;
};
} // namespace transport