aboutsummaryrefslogtreecommitdiffstats
path: root/Input/ICNConnectionConsumerApi.cpp
diff options
context:
space:
mode:
authorjsamain <jsamain@cisco.com>2019-05-27 18:59:35 +0200
committerjsamain <jsamain@cisco.com>2019-05-27 18:59:35 +0200
commit2a876fc0d7986dc1ecb169bdc41972fe0f33d0dd (patch)
tree4a907472bfbe31e3fa75e3291282af27d6ba6956 /Input/ICNConnectionConsumerApi.cpp
parent6dd3a9e9f88d7ef36707dad09f16685944aa182c (diff)
Update to be compliant with [HICN-206] Customize first part of the name for HTTP.
Added the -P option to set the IPv6 first word of the name. Change-Id: I321b22450d0efee713ddefef7405cf46ee381369 Signed-off-by: jsamain <jsamain@cisco.com>
Diffstat (limited to 'Input/ICNConnectionConsumerApi.cpp')
-rw-r--r--Input/ICNConnectionConsumerApi.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Input/ICNConnectionConsumerApi.cpp b/Input/ICNConnectionConsumerApi.cpp
index a7f52b44..c93e9ed4 100644
--- a/Input/ICNConnectionConsumerApi.cpp
+++ b/Input/ICNConnectionConsumerApi.cpp
@@ -36,14 +36,15 @@ using duration_in_seconds = std::chrono::duration<double, std::ratio<1, 1> >;
namespace libdash {
namespace framework {
namespace input {
-ICNConnectionConsumerApi::ICNConnectionConsumerApi(double alpha, float beta, float drop) :
+ICNConnectionConsumerApi::ICNConnectionConsumerApi(double alpha, float beta, float drop, std::string v6FirstWord) :
m_first(1),
m_isFinished(false),
sizeDownloaded (0),
cumulativeBytesReceived(0),
icnAlpha(alpha),
beta(beta),
- drop(drop)
+ drop(drop),
+ v6FirstWord(v6FirstWord)
{
gamma = 1;
this->speed = 0.0;
@@ -146,7 +147,7 @@ int ICNConnectionConsumerApi::Read(uint8_t *data, size_t len)
{"User-Agent", "higet/1.0"},
{"Connection", "Keep-Alive"}};
std::string s(m_name.c_str());
- hTTPClientConnection->get(s, headers);
+ hTTPClientConnection->get(s, headers, {}, nullptr, nullptr, this->v6FirstWord);
response = hTTPClientConnection->response();
this->res = true;
this->dataPos = 0;