Add possibility to retrieve the low level consumer socket from the HTTP client helper 23/7323/3
authorMauro Sardara <[email protected]>
Tue, 27 Jun 2017 12:59:04 +0000 (14:59 +0200)
committerMauro Sardara <[email protected]>
Tue, 27 Jun 2017 13:13:54 +0000 (15:13 +0200)
Change-Id: I7a51427396397d06608fdae36e30c6f0bc7a9f3e
Signed-off-by: Mauro Sardara <[email protected]>
CMakeLists.txt
icnet/http/icnet_http_client_connection.cc
icnet/http/icnet_http_client_connection.h
icnet/transport/icnet_transport_socket_options_default_values.h

index e5ed91f..74dd85d 100644 (file)
@@ -98,7 +98,6 @@ endif()
 
 if(ANDROID_API)
   include_directories(${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include)
-  include_directories(${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/4.9/include)
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ANDROID_C_FLAGS} -Wall")
 else()
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
index 1f0d8fd..8dbc413 100644 (file)
@@ -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
+}
index 5a009d8..41a2a4f 100644 (file)
@@ -39,6 +39,8 @@ class HTTPClientConnection {
 
   HTTPClientConnection &stop();
 
+  transport::ConsumerSocket &getConsumer();
+
  private:
 
   void processPayload(transport::ConsumerSocket &c, std::vector<uint8_t> &&payload);
index 6214fc9..3589c13 100644 (file)
@@ -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