aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/hicn/transport/interfaces
diff options
context:
space:
mode:
authorAngelo Mantellini <manangel@cisco.com>2019-01-30 12:11:34 +0100
committerAngelo Mantellini <manangel@cisco.com>2019-01-30 15:23:44 +0100
commite5145b878f9de35676085409878a66899d2ee4f2 (patch)
tree177f77810901921ee03d1d3b850600c5f2cd1ef9 /libtransport/src/hicn/transport/interfaces
parent30061551cd39c9f30280bfa0cf3cc909f4fac015 (diff)
[HICN-18] first commit of libtransport for windows
Change-Id: I3a43b22194aa13ae5de1746e3d4bd9a275070261 Signed-off-by: Angelo Mantellini <manangel@cisco.com>
Diffstat (limited to 'libtransport/src/hicn/transport/interfaces')
-rw-r--r--[-rwxr-xr-x]libtransport/src/hicn/transport/interfaces/CMakeLists.txt0
-rw-r--r--[-rwxr-xr-x]libtransport/src/hicn/transport/interfaces/async_transport.h3
-rw-r--r--libtransport/src/hicn/transport/interfaces/full_duplex_socket.cc20
-rw-r--r--[-rwxr-xr-x]libtransport/src/hicn/transport/interfaces/full_duplex_socket.h0
-rw-r--r--[-rwxr-xr-x]libtransport/src/hicn/transport/interfaces/publication_options.h0
-rw-r--r--[-rwxr-xr-x]libtransport/src/hicn/transport/interfaces/rtc_socket_consumer.cc3
-rw-r--r--[-rwxr-xr-x]libtransport/src/hicn/transport/interfaces/rtc_socket_consumer.h0
-rw-r--r--libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc1
-rw-r--r--[-rwxr-xr-x]libtransport/src/hicn/transport/interfaces/rtc_socket_producer.h0
-rw-r--r--[-rwxr-xr-x]libtransport/src/hicn/transport/interfaces/socket.h0
-rw-r--r--[-rwxr-xr-x]libtransport/src/hicn/transport/interfaces/socket_consumer.h0
-rw-r--r--[-rwxr-xr-x]libtransport/src/hicn/transport/interfaces/socket_options_default_values.h0
-rw-r--r--[-rwxr-xr-x]libtransport/src/hicn/transport/interfaces/socket_options_keys.h0
-rw-r--r--[-rwxr-xr-x]libtransport/src/hicn/transport/interfaces/socket_producer.cc5
-rw-r--r--[-rwxr-xr-x]libtransport/src/hicn/transport/interfaces/socket_producer.h0
15 files changed, 16 insertions, 16 deletions
diff --git a/libtransport/src/hicn/transport/interfaces/CMakeLists.txt b/libtransport/src/hicn/transport/interfaces/CMakeLists.txt
index cbf371bac..cbf371bac 100755..100644
--- a/libtransport/src/hicn/transport/interfaces/CMakeLists.txt
+++ b/libtransport/src/hicn/transport/interfaces/CMakeLists.txt
diff --git a/libtransport/src/hicn/transport/interfaces/async_transport.h b/libtransport/src/hicn/transport/interfaces/async_transport.h
index 492b4ec26..2911377a4 100755..100644
--- a/libtransport/src/hicn/transport/interfaces/async_transport.h
+++ b/libtransport/src/hicn/transport/interfaces/async_transport.h
@@ -20,7 +20,10 @@
#include <hicn/transport/portability/portability.h>
#include <hicn/transport/utils/sharable_vector.h>
+#ifndef _WIN32
#include <sys/uio.h>
+#endif
+
#include <memory>
namespace transport {
diff --git a/libtransport/src/hicn/transport/interfaces/full_duplex_socket.cc b/libtransport/src/hicn/transport/interfaces/full_duplex_socket.cc
index e06858cc3..0a091d94e 100644
--- a/libtransport/src/hicn/transport/interfaces/full_duplex_socket.cc
+++ b/libtransport/src/hicn/transport/interfaces/full_duplex_socket.cc
@@ -57,21 +57,23 @@ AsyncFullDuplexSocket::AsyncFullDuplexSocket(const Prefix &locator,
producer_->setSocketOption(GeneralTransportOptions::OUTPUT_BUFFER_SIZE,
uint32_t{150000});
- producer_->setSocketOption(
- ProducerCallbacksOptions::CONTENT_PRODUCED,
- std::bind(&AsyncFullDuplexSocket::onContentProduced, this, _1, _2, _3));
+ ProducerContentCallback producer_callback =
+ std::bind(&AsyncFullDuplexSocket::onContentProduced, this, _1, _2, _3);
+ producer_->setSocketOption(ProducerCallbacksOptions::CONTENT_PRODUCED,
+ producer_callback);
producer_->connect();
- consumer_->setSocketOption(ConsumerCallbacksOptions::CONTENT_OBJECT_TO_VERIFY,
- (ConsumerContentObjectVerificationCallback)[](
- ConsumerSocket & s, const ContentObject &c)
- ->bool { return true; });
+ consumer_->setSocketOption(
+ ConsumerCallbacksOptions::CONTENT_OBJECT_TO_VERIFY,
+ (ConsumerContentObjectVerificationCallback)[](ConsumerSocket & s,
+ const ContentObject &c)
+ ->bool { return true; });
- ConsumerContentCallback callback =
+ ConsumerContentCallback consumer_callback =
std::bind(&AsyncFullDuplexSocket::onContentRetrieved, this, _1, _2, _3);
consumer_->setSocketOption(ConsumerCallbacksOptions::CONTENT_RETRIEVED,
- callback);
+ consumer_callback);
consumer_->setSocketOption(GeneralTransportOptions::MAX_INTEREST_RETX,
uint32_t{4});
diff --git a/libtransport/src/hicn/transport/interfaces/full_duplex_socket.h b/libtransport/src/hicn/transport/interfaces/full_duplex_socket.h
index f881bea54..f881bea54 100755..100644
--- a/libtransport/src/hicn/transport/interfaces/full_duplex_socket.h
+++ b/libtransport/src/hicn/transport/interfaces/full_duplex_socket.h
diff --git a/libtransport/src/hicn/transport/interfaces/publication_options.h b/libtransport/src/hicn/transport/interfaces/publication_options.h
index ae5366ce7..ae5366ce7 100755..100644
--- a/libtransport/src/hicn/transport/interfaces/publication_options.h
+++ b/libtransport/src/hicn/transport/interfaces/publication_options.h
diff --git a/libtransport/src/hicn/transport/interfaces/rtc_socket_consumer.cc b/libtransport/src/hicn/transport/interfaces/rtc_socket_consumer.cc
index cc4f478af..ef952a891 100755..100644
--- a/libtransport/src/hicn/transport/interfaces/rtc_socket_consumer.cc
+++ b/libtransport/src/hicn/transport/interfaces/rtc_socket_consumer.cc
@@ -22,8 +22,7 @@ namespace interface {
RTCConsumerSocket::RTCConsumerSocket(int protocol, asio::io_service &io_service)
: ConsumerSocket(protocol, io_service) {}
-RTCConsumerSocket::RTCConsumerSocket(int protocol)
- : ConsumerSocket(protocol) {}
+RTCConsumerSocket::RTCConsumerSocket(int protocol) : ConsumerSocket(protocol) {}
RTCConsumerSocket::~RTCConsumerSocket() {}
diff --git a/libtransport/src/hicn/transport/interfaces/rtc_socket_consumer.h b/libtransport/src/hicn/transport/interfaces/rtc_socket_consumer.h
index cfde3128d..cfde3128d 100755..100644
--- a/libtransport/src/hicn/transport/interfaces/rtc_socket_consumer.h
+++ b/libtransport/src/hicn/transport/interfaces/rtc_socket_consumer.h
diff --git a/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc b/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc
index f19502dee..84c80dad7 100644
--- a/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc
+++ b/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc
@@ -72,7 +72,6 @@ RTCProducerSocket::RTCProducerSocket()
prodLabel_ = ((rand() % 255) << 24UL);
}
-
RTCProducerSocket::~RTCProducerSocket() {}
void RTCProducerSocket::registerName(Prefix &producer_namespace) {
diff --git a/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.h b/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.h
index f1bcaa9e8..f1bcaa9e8 100755..100644
--- a/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.h
+++ b/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.h
diff --git a/libtransport/src/hicn/transport/interfaces/socket.h b/libtransport/src/hicn/transport/interfaces/socket.h
index 22757810a..22757810a 100755..100644
--- a/libtransport/src/hicn/transport/interfaces/socket.h
+++ b/libtransport/src/hicn/transport/interfaces/socket.h
diff --git a/libtransport/src/hicn/transport/interfaces/socket_consumer.h b/libtransport/src/hicn/transport/interfaces/socket_consumer.h
index 536d2fde3..536d2fde3 100755..100644
--- a/libtransport/src/hicn/transport/interfaces/socket_consumer.h
+++ b/libtransport/src/hicn/transport/interfaces/socket_consumer.h
diff --git a/libtransport/src/hicn/transport/interfaces/socket_options_default_values.h b/libtransport/src/hicn/transport/interfaces/socket_options_default_values.h
index 5fae1c484..5fae1c484 100755..100644
--- a/libtransport/src/hicn/transport/interfaces/socket_options_default_values.h
+++ b/libtransport/src/hicn/transport/interfaces/socket_options_default_values.h
diff --git a/libtransport/src/hicn/transport/interfaces/socket_options_keys.h b/libtransport/src/hicn/transport/interfaces/socket_options_keys.h
index 1afad2b48..1afad2b48 100755..100644
--- a/libtransport/src/hicn/transport/interfaces/socket_options_keys.h
+++ b/libtransport/src/hicn/transport/interfaces/socket_options_keys.h
diff --git a/libtransport/src/hicn/transport/interfaces/socket_producer.cc b/libtransport/src/hicn/transport/interfaces/socket_producer.cc
index d9204f111..5bd522faf 100755..100644
--- a/libtransport/src/hicn/transport/interfaces/socket_producer.cc
+++ b/libtransport/src/hicn/transport/interfaces/socket_producer.cc
@@ -54,7 +54,6 @@ ProducerSocket::ProducerSocket(asio::io_service &io_service)
}
ProducerSocket::~ProducerSocket() {
-
processing_thread_stop_ = true;
portal_->stopEventsLoop(true);
@@ -78,9 +77,7 @@ void ProducerSocket::serveForever() {
}
}
-void ProducerSocket::stop() {
- portal_->stopEventsLoop();
-}
+void ProducerSocket::stop() { portal_->stopEventsLoop(); }
void ProducerSocket::registerPrefix(const Prefix &producer_namespace) {
served_namespaces_.push_back(producer_namespace);
diff --git a/libtransport/src/hicn/transport/interfaces/socket_producer.h b/libtransport/src/hicn/transport/interfaces/socket_producer.h
index 06c47d973..06c47d973 100755..100644
--- a/libtransport/src/hicn/transport/interfaces/socket_producer.h
+++ b/libtransport/src/hicn/transport/interfaces/socket_producer.h