From 4da1b7955fb3190c0e0646cfde99436aa140d271 Mon Sep 17 00:00:00 2001 From: Mauro Sardara Date: Mon, 5 Jun 2017 18:43:52 +0200 Subject: - Added proxy function - Changed interface between library and application - Support for different build type Change-Id: I34ae75057490eb887d353e53c6d013f88bead04f Signed-off-by: Mauro Sardara --- http-server/icn_response.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'http-server/icn_response.cc') diff --git a/http-server/icn_response.cc b/http-server/icn_response.cc index 6fe8b1e1..241eda51 100644 --- a/http-server/icn_response.cc +++ b/http-server/icn_response.cc @@ -17,22 +17,23 @@ namespace icn_httpserver { -IcnResponse::IcnResponse(std::shared_ptr producer, +IcnResponse::IcnResponse(std::shared_ptr publisher, std::string ndn_name, std::string ndn_path, int response_id) - : producer_(producer), ndn_name_(ndn_name), ndn_path_(ndn_path), response_id_(response_id) { + : publisher_(publisher), ndn_name_(ndn_name), ndn_path_(ndn_path), response_id_(response_id) { } void IcnResponse::send(const SendCallback &callback) { std::size_t buffer_size = this->streambuf_.size(); this->streambuf_.commit(this->streambuf_.size()); - this->producer_->produce(icnet::Name(/*this->ndn_name*/), - boost::asio::buffer_cast(this->streambuf_.data()), - buffer_size, - this->response_id_, - this->is_last_); + std::cout << "Rrsponse Id " << response_id_ << std::endl; + + this->publisher_->publishContent(boost::asio::buffer_cast(this->streambuf_.data()), + buffer_size, + this->response_id_, + this->is_last_); this->streambuf_.consume(buffer_size); -- cgit 1.2.3-korg