diff options
author | Angelo Mantellini <manangel@cisco.com> | 2019-03-22 11:04:20 +0100 |
---|---|---|
committer | Angelo Mantellini <manangel@cisco.com> | 2019-03-22 11:36:21 +0100 |
commit | b5fc2106912f0ed3168972caee33b45ee6bb4b53 (patch) | |
tree | 4340be4fdab0c0d54c36f041d69421bc6ff41e05 /Input/ICNConnectionConsumerApi.cpp | |
parent | 78089ad6898f15bc6a716eb39e3f6087dfd9f553 (diff) |
[HICN-8] Update viper video player to use hicn sockets over HTTP
Change-Id: I0aa727e513e3ffcf3286cecc7e7c43237da5155f
Signed-off-by: Angelo Mantellini <manangel@cisco.com>
Diffstat (limited to 'Input/ICNConnectionConsumerApi.cpp')
-rw-r--r-- | Input/ICNConnectionConsumerApi.cpp | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/Input/ICNConnectionConsumerApi.cpp b/Input/ICNConnectionConsumerApi.cpp index 15475d5f..f983a054 100644 --- a/Input/ICNConnectionConsumerApi.cpp +++ b/Input/ICNConnectionConsumerApi.cpp @@ -55,8 +55,12 @@ ICNConnectionConsumerApi::ICNConnectionConsumerApi(double alpha, float beta, flo this->res = false; InitializeConditionVariable (&this->contentRetrieved); InitializeCriticalSection (&this->monitorMutex); - this->hTTPClientConnection = new libl4::http::HTTPClientConnection(); - libl4::transport::ConsumerSocket &c = this->hTTPClientConnection->getConsumer(); + this->hTTPClientConnection = new libl4::http::HTTPClientConnection(); +#ifdef HICNET + transport::interface::ConsumerSocket &c = this->hTTPClientConnection->getConsumer(); +#else + libl4::transport::ConsumerSocket &c = this->hTTPClientConnection->getConsumer(); +#endif bool configFile = false; //CHECK if we are not going to override the configuration file. (if !autotune) if(FILE *fp = fopen("/usr/etc/consumer.conf", "r")) @@ -64,14 +68,25 @@ ICNConnectionConsumerApi::ICNConnectionConsumerApi(double alpha, float beta, flo fclose(fp); configFile = true; } +#ifdef HICNET if(!configFile) { qDebug("beta %f, drop %f", this->beta, this->drop); - c.setSocketOption(libl4::transport::RaaqmTransportOptions::BETA_VALUE, this->beta); - c.setSocketOption(libl4::transport::RaaqmTransportOptions::DROP_FACTOR, this->drop); + c.setSocketOption(transport::interface::RaaqmTransportOptions::BETA_VALUE, this->beta); + c.setSocketOption(transport::interface::RaaqmTransportOptions::DROP_FACTOR, this->drop); } - c.setSocketOption(int(libl4::transport::RateEstimationOptions::RATE_ESTIMATION_OBSERVER), (libl4::transport::IcnObserver * )this); + c.setSocketOption(int(transport::interface::RateEstimationOptions::RATE_ESTIMATION_OBSERVER), (transport::protocol::IcnObserver * )this); +#else + if(!configFile) + { + qDebug("beta %f, drop %f", this->beta, this->drop); + + c.setSocketOption(libl4::transport::RaaqmTransportOptions::BETA_VALUE, this->beta); + c.setSocketOption(libl4::transport::RaaqmTransportOptions::DROP_FACTOR, this->drop); + } + c.setSocketOption(int(libl4::transport::RateEstimationOptions::RATE_ESTIMATION_OBSERVER), (libl4::transport::IcnObserver * )this); +#endif #ifdef NO_GUI if(this->icnAlpha != 20) this->icnRateBased = true; |