aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/interfaces/socket_consumer.cc
diff options
context:
space:
mode:
authorEnrico Loparco (eloparco) <eloparco@cisco.com>2021-06-24 09:15:41 +0200
committerEnrico Loparco (eloparco) <eloparco@cisco.com>2021-06-24 09:15:41 +0200
commit229385955109b866a23c4ac2aa03d4d11044c39d (patch)
tree0591f9c2fc4144d62330337cc2b94c63dfeded54 /libtransport/src/interfaces/socket_consumer.cc
parent6ffbb5ed61733b8dbef39b1a9d437e899e9359d7 (diff)
[HICN-708] Rebase with master
Signed-off-by: Enrico Loparco (eloparco) <eloparco@cisco.com> Change-Id: I2122e1d61dd3b2e039972624ffbdbcb3c5610159
Diffstat (limited to 'libtransport/src/interfaces/socket_consumer.cc')
-rw-r--r--libtransport/src/interfaces/socket_consumer.cc36
1 files changed, 7 insertions, 29 deletions
diff --git a/libtransport/src/interfaces/socket_consumer.cc b/libtransport/src/interfaces/socket_consumer.cc
index b4be16ade..4eee73cab 100644
--- a/libtransport/src/interfaces/socket_consumer.cc
+++ b/libtransport/src/interfaces/socket_consumer.cc
@@ -14,7 +14,6 @@
*/
#include <hicn/transport/interfaces/socket_consumer.h>
-
#include <implementation/socket_consumer.h>
namespace transport {
@@ -24,6 +23,11 @@ ConsumerSocket::ConsumerSocket(int protocol) {
socket_ = std::make_unique<implementation::ConsumerSocket>(this, protocol);
}
+ConsumerSocket::ConsumerSocket(int protocol, asio::io_service &io_service) {
+ socket_ = std::make_unique<implementation::ConsumerSocket>(this, protocol,
+ io_service);
+}
+
ConsumerSocket::ConsumerSocket() {}
ConsumerSocket::~ConsumerSocket() { socket_->stop(); }
@@ -42,8 +46,6 @@ void ConsumerSocket::stop() { socket_->stop(); }
void ConsumerSocket::resume() { socket_->resume(); }
-bool ConsumerSocket::verifyKeyPackets() { return socket_->verifyKeyPackets(); }
-
asio::io_service &ConsumerSocket::getIoService() {
return socket_->getIoService();
}
@@ -84,22 +86,10 @@ int ConsumerSocket::setSocketOption(
}
int ConsumerSocket::setSocketOption(
- int socket_option_key,
- ConsumerContentObjectVerificationCallback socket_option_value) {
- return socket_->setSocketOption(socket_option_key, socket_option_value);
-}
-
-int ConsumerSocket::setSocketOption(
int socket_option_key, ConsumerInterestCallback socket_option_value) {
return socket_->setSocketOption(socket_option_key, socket_option_value);
}
-int ConsumerSocket::setSocketOption(
- int socket_option_key,
- ConsumerContentObjectVerificationFailedCallback socket_option_value) {
- return socket_->setSocketOption(socket_option_key, socket_option_value);
-}
-
int ConsumerSocket::setSocketOption(int socket_option_key,
IcnObserver *socket_option_value) {
return socket_->setSocketOption(socket_option_key, socket_option_value);
@@ -107,7 +97,7 @@ int ConsumerSocket::setSocketOption(int socket_option_key,
int ConsumerSocket::setSocketOption(
int socket_option_key,
- const std::shared_ptr<utils::Verifier> &socket_option_value) {
+ const std::shared_ptr<auth::Verifier> &socket_option_value) {
return socket_->setSocketOption(socket_option_key, socket_option_value);
}
@@ -148,22 +138,10 @@ int ConsumerSocket::getSocketOption(
}
int ConsumerSocket::getSocketOption(
- int socket_option_key,
- ConsumerContentObjectVerificationCallback **socket_option_value) {
- return socket_->setSocketOption(socket_option_key, socket_option_value);
-}
-
-int ConsumerSocket::getSocketOption(
int socket_option_key, ConsumerInterestCallback **socket_option_value) {
return socket_->setSocketOption(socket_option_key, socket_option_value);
}
-int ConsumerSocket::getSocketOption(
- int socket_option_key,
- ConsumerContentObjectVerificationFailedCallback **socket_option_value) {
- return socket_->setSocketOption(socket_option_key, socket_option_value);
-}
-
int ConsumerSocket::getSocketOption(int socket_option_key,
IcnObserver **socket_option_value) {
return socket_->getSocketOption(socket_option_key, socket_option_value);
@@ -171,7 +149,7 @@ int ConsumerSocket::getSocketOption(int socket_option_key,
int ConsumerSocket::getSocketOption(
int socket_option_key,
- std::shared_ptr<utils::Verifier> &socket_option_value) {
+ std::shared_ptr<auth::Verifier> &socket_option_value) {
return socket_->getSocketOption(socket_option_key, socket_option_value);
}