aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/hicn/transport/interfaces/socket_consumer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libtransport/src/hicn/transport/interfaces/socket_consumer.cc')
-rw-r--r--libtransport/src/hicn/transport/interfaces/socket_consumer.cc14
1 files changed, 5 insertions, 9 deletions
diff --git a/libtransport/src/hicn/transport/interfaces/socket_consumer.cc b/libtransport/src/hicn/transport/interfaces/socket_consumer.cc
index ca9722849..37d545779 100644
--- a/libtransport/src/hicn/transport/interfaces/socket_consumer.cc
+++ b/libtransport/src/hicn/transport/interfaces/socket_consumer.cc
@@ -48,7 +48,6 @@ ConsumerSocket::ConsumerSocket(int protocol, asio::io_service &io_service)
is_async_(false),
verifier_(std::make_shared<utils::Verifier>()),
verify_signature_(false),
- content_buffer_(nullptr),
on_interest_output_(VOID_HANDLER),
on_interest_timeout_(VOID_HANDLER),
on_interest_satisfied_(VOID_HANDLER),
@@ -56,7 +55,8 @@ ConsumerSocket::ConsumerSocket(int protocol, asio::io_service &io_service)
on_content_object_verification_(VOID_HANDLER),
on_content_object_(VOID_HANDLER),
on_manifest_(VOID_HANDLER),
- on_payload_retrieved_(VOID_HANDLER),
+ stats_summary_(VOID_HANDLER),
+ read_callback_(nullptr),
virtual_download_(false),
rtt_stats_(false),
timer_interval_milliseconds_(0) {
@@ -81,13 +81,11 @@ ConsumerSocket::~ConsumerSocket() {
void ConsumerSocket::connect() { portal_->connect(); }
-int ConsumerSocket::consume(const Name &name, ContentBuffer &receive_buffer) {
+int ConsumerSocket::consume(const Name &name) {
if (transport_protocol_->isRunning()) {
return CONSUMER_BUSY;
}
- content_buffer_ = receive_buffer;
-
network_name_ = name;
network_name_.setSuffix(0);
is_async_ = false;
@@ -97,14 +95,12 @@ int ConsumerSocket::consume(const Name &name, ContentBuffer &receive_buffer) {
return CONSUMER_FINISHED;
}
-int ConsumerSocket::asyncConsume(const Name &name,
- ContentBuffer &receive_buffer) {
+int ConsumerSocket::asyncConsume(const Name &name) {
if (!async_downloader_.stopped()) {
- async_downloader_.add([this, receive_buffer, name]() {
+ async_downloader_.add([this, name]() {
network_name_ = std::move(name);
network_name_.setSuffix(0);
is_async_ = true;
- content_buffer_ = receive_buffer;
transport_protocol_->start();
});
}