aboutsummaryrefslogtreecommitdiffstats
path: root/icnet
diff options
context:
space:
mode:
authorMauro Sardara <msardara+fdio@cisco.com>2017-06-27 14:59:04 +0200
committerMauro Sardara <msardara+fdio@cisco.com>2017-06-27 15:13:54 +0200
commit739551a6d64c91e18587ddd5f62018b55dc20664 (patch)
treefaad5800e2dedba1e4c769b71a950a3555a0dc1a /icnet
parentd22d2b4785e2f4eafc8dda2ae032931f89c7e45f (diff)
Add possibility to retrieve the low level consumer socket from the HTTP client helper
Change-Id: I7a51427396397d06608fdae36e30c6f0bc7a9f3e Signed-off-by: Mauro Sardara <msardara+fdio@cisco.com>
Diffstat (limited to 'icnet')
-rw-r--r--icnet/http/icnet_http_client_connection.cc11
-rw-r--r--icnet/http/icnet_http_client_connection.h2
-rw-r--r--icnet/transport/icnet_transport_socket_options_default_values.h2
3 files changed, 8 insertions, 7 deletions
diff --git a/icnet/http/icnet_http_client_connection.cc b/icnet/http/icnet_http_client_connection.cc
index 1f0d8fd8..8dbc4137 100644
--- a/icnet/http/icnet_http_client_connection.cc
+++ b/icnet/http/icnet_http_client_connection.cc
@@ -27,11 +27,6 @@ using namespace transport;
HTTPClientConnection::HTTPClientConnection()
: consumer_(Name("ccnx:"), transport::TransportProtocolAlgorithms::RAAQM) {
- consumer_.setSocketOption(GeneralTransportOptions::INTEREST_LIFETIME, 1001);
- consumer_.setSocketOption(RaaqmTransportOptions::BETA_VALUE, DEFAULT_BETA);
- consumer_.setSocketOption(RaaqmTransportOptions::DROP_FACTOR, DEFAULT_GAMMA);
- consumer_.setSocketOption(GeneralTransportOptions::MAX_INTEREST_RETX, 200);
-
consumer_.setSocketOption(ConsumerCallbacksOptions::CONTENT_OBJECT_TO_VERIFY,
(ConsumerContentObjectVerificationCallback) std::bind(&HTTPClientConnection::verifyData,
this,
@@ -114,6 +109,10 @@ HTTPClientConnection& HTTPClientConnection::stop() {
return *this;
}
+transport::ConsumerSocket& HTTPClientConnection::getConsumer() {
+ return consumer_;
+}
+
}
-} \ No newline at end of file
+}
diff --git a/icnet/http/icnet_http_client_connection.h b/icnet/http/icnet_http_client_connection.h
index 5a009d88..41a2a4f9 100644
--- a/icnet/http/icnet_http_client_connection.h
+++ b/icnet/http/icnet_http_client_connection.h
@@ -39,6 +39,8 @@ class HTTPClientConnection {
HTTPClientConnection &stop();
+ transport::ConsumerSocket &getConsumer();
+
private:
void processPayload(transport::ConsumerSocket &c, std::vector<uint8_t> &&payload);
diff --git a/icnet/transport/icnet_transport_socket_options_default_values.h b/icnet/transport/icnet_transport_socket_options_default_values.h
index 6214fc96..3589c131 100644
--- a/icnet/transport/icnet_transport_socket_options_default_values.h
+++ b/icnet/transport/icnet_transport_socket_options_default_values.h
@@ -22,7 +22,7 @@ namespace transport {
namespace default_values {
-const int interest_lifetime = 1000; // milliseconds
+const int interest_lifetime = 1001; // milliseconds
const int content_object_expiry_time = 50000; // milliseconds -> 50 seconds
const int content_object_packet_size = 1500; // The ethernet MTU
const int producer_socket_input_buffer_size = 150000; // Interests