aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/interfaces/socket_consumer.cc
diff options
context:
space:
mode:
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);
}