From 2a876fc0d7986dc1ecb169bdc41972fe0f33d0dd Mon Sep 17 00:00:00 2001 From: jsamain Date: Mon, 27 May 2019 18:59:35 +0200 Subject: 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 --- Input/ICNConnectionConsumerApi.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Input/ICNConnectionConsumerApi.cpp') 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 >; 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; -- cgit 1.2.3-korg