From c365689250216861fd7727203ee6ba1049ad5778 Mon Sep 17 00:00:00 2001 From: Mauro Sardara Date: Wed, 3 Apr 2019 10:03:56 +0200 Subject: [HICN-155] Consumer socket allows now to read N bytes from the network, where N is defined by the application. Change-Id: Ib20309b40e43e4c0db09b9b484e18cd2e3ebf581 Signed-off-by: Mauro Sardara --- .../src/hicn/transport/interfaces/socket.h | 62 ++-------------------- 1 file changed, 4 insertions(+), 58 deletions(-) (limited to 'libtransport/src/hicn/transport/interfaces/socket.h') diff --git a/libtransport/src/hicn/transport/interfaces/socket.h b/libtransport/src/hicn/transport/interfaces/socket.h index 7d50d0fbd..90f6a3ef6 100644 --- a/libtransport/src/hicn/transport/interfaces/socket.h +++ b/libtransport/src/hicn/transport/interfaces/socket.h @@ -16,18 +16,10 @@ #pragma once #include -#include #include -#include -#include -#include -#include +#include #include #include -#include -#include -#include -#include #define SOCKET_OPTION_GET 0 #define SOCKET_OPTION_NOT_GET 1 @@ -39,26 +31,14 @@ namespace transport { -namespace protocol { -class IcnObserver; -class TransportStatistics; -} // namespace protocol - namespace interface { +// Forward Declarations template class Socket; -class ConsumerSocket; -class ProducerSocket; - -// using Interest = core::Interest; -// using ContentObject = core::ContentObject; -// using Name = core::Name; -// using HashAlgorithm = core::HashAlgorithm; -// using CryptoSuite = utils::CryptoSuite; -// using Identity = utils::Identity; -// using Verifier = utils::Verifier; +// Define the portal and its connector, depending on the compilation options +// passed by the build tool. using HicnForwarderPortal = core::HicnForwarderPortal; #ifdef __linux__ @@ -76,40 +56,6 @@ using BaseSocket = Socket; using BasePortal = HicnForwarderPortal; #endif -using PayloadType = core::PayloadType; -using Prefix = core::Prefix; -using Array = utils::Array; -using ContentBuffer = std::shared_ptr>; - -using ConsumerInterestCallback = - std::function; - -using ConsumerContentCallback = - std::function; - -using ConsumerTimerCallback = std::function; - -using ProducerContentCallback = std::function; - -using ConsumerContentObjectCallback = - std::function; - -using ConsumerContentObjectVerificationCallback = - std::function; - -using ConsumerManifestCallback = - std::function; - -using ProducerContentObjectCallback = - std::function; - -using ProducerInterestCallback = - std::function; - -using namespace protocol; - template class Socket { static_assert(std::is_same::value -- cgit 1.2.3-korg