summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2020-02-07 20:00:06 +0100
committerMauro Sardara <msardara@cisco.com>2020-02-12 18:40:52 +0100
commit3bce9bfdce707313de4f9cccdc867abd9edf82df (patch)
treebd7d75a7251888a3fc269fadebd59842c46a14a1 /apps
parentf9243a2bf823086404be1c41c7bcc1b27cfab7de (diff)
[HICN-508] [HICN-509] [HICN-506] Manifest rework
Change-Id: I992205148910be008d66b5acb7f6f1365770f9e8 Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/http-proxy/src/ATSConnector.h2
-rw-r--r--apps/http-proxy/src/IcnReceiver.cc14
2 files changed, 14 insertions, 2 deletions
diff --git a/apps/http-proxy/src/ATSConnector.h b/apps/http-proxy/src/ATSConnector.h
index aa5662e24..db485605f 100644
--- a/apps/http-proxy/src/ATSConnector.h
+++ b/apps/http-proxy/src/ATSConnector.h
@@ -36,7 +36,7 @@ typedef std::deque<
BufferQueue;
class ATSConnector {
- static constexpr uint32_t buffer_size = 1024 * 64;
+ static constexpr uint32_t buffer_size = 1024 * 512;
enum class ConnectorState {
CLOSED,
diff --git a/apps/http-proxy/src/IcnReceiver.cc b/apps/http-proxy/src/IcnReceiver.cc
index 18553d84b..8d0fb4917 100644
--- a/apps/http-proxy/src/IcnReceiver.cc
+++ b/apps/http-proxy/src/IcnReceiver.cc
@@ -80,6 +80,13 @@ AsyncConsumerProducer::AsyncConsumerProducer(
}
ret = producer_socket_.setSocketOption(
+ interface::GeneralTransportOptions::MAKE_MANIFEST, true);
+
+ if (ret != SOCKET_OPTION_SET) {
+ TRANSPORT_LOGD("Warning: impossible to enable signatures.");
+ }
+
+ ret = producer_socket_.setSocketOption(
interface::GeneralTransportOptions::DATA_PACKET_SIZE, mtu_);
if (ret != SOCKET_OPTION_SET) {
@@ -130,6 +137,8 @@ void AsyncConsumerProducer::manageIncomingInterest(
auto _it = chunk_number_map_.find(name);
auto _end = chunk_number_map_.end();
+ std::cout << "Received interest " << seg << std::endl;
+
if (_it != _end) {
if (_it->second.second) {
// Content is in production
@@ -137,7 +146,7 @@ void AsyncConsumerProducer::manageIncomingInterest(
}
if (seg >= _it->second.first) {
- TRANSPORT_LOGD(
+ TRANSPORT_LOGI(
"Ignoring interest with name %s for a content object which does not "
"exist. (Request: %u, max: %u)",
name.toString().c_str(), (uint32_t)seg, (uint32_t)_it->second.first);
@@ -145,6 +154,8 @@ void AsyncConsumerProducer::manageIncomingInterest(
}
}
+ std::cout << "Received interest " << seg << std::endl;
+
bool is_mpd =
HTTPMessageFastParser::isMpdRequest(payload->data(), payload->length());
@@ -194,6 +205,7 @@ void AsyncConsumerProducer::publishContent(const uint8_t* data,
if (headers) {
request_counter_++;
}
+
it->second.first +=
producer_socket_.produce(name, data, size, is_last, start_suffix);