summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorAngelo Mantellini <angelo.mantellini@cisco.com>2020-02-27 16:06:50 +0000
committerGerrit Code Review <gerrit@fd.io>2020-02-27 16:06:50 +0000
commitee91ccd88a2fe1de74e4128ef84840e58ec70295 (patch)
tree9a435acaee53a8d455b1c1f8212f20ffb9a4de70 /utils
parent0fe06328d8bb8a174f0e9a246b437e5eaf2a7628 (diff)
parent443f9e81c2f721898c1e7edf2940172fef6f55fe (diff)
Merge "[HICN-539] Expose portal APIs to applications"
Diffstat (limited to 'utils')
-rw-r--r--utils/src/ping_client.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/utils/src/ping_client.cc b/utils/src/ping_client.cc
index 6dea17418..67440cdc1 100644
--- a/utils/src/ping_client.cc
+++ b/utils/src/ping_client.cc
@@ -14,9 +14,9 @@
*/
#include <hicn/transport/core/interest.h>
+#include <hicn/transport/interfaces/portal.h>
#include <hicn/transport/security/verifier.h>
-
-#include <implementation/socket_consumer.h>
+#include <hicn/transport/utils/log.h>
// Let's make the linker happy
#if !TRANSPORT_LOG_EXTERN_GLOBAL_OUTPUT_LEVEL
@@ -25,6 +25,7 @@ TRANSPORT_LOG_DEFINE_GLOBAL_OUTPUT_LEVEL = 0;
#endif
#endif
+#include <asio/signal_set.hpp>
#include <asio/steady_timer.hpp>
#include <chrono>
#include <map>
@@ -83,7 +84,7 @@ class Configuration {
}
};
-class Client : implementation::BasePortal::ConsumerCallback {
+class Client : interface::Portal::ConsumerCallback {
public:
Client(Configuration *c)
: portal_(), signals_(portal_.getIoService(), SIGINT) {
@@ -213,6 +214,8 @@ class Client : implementation::BasePortal::ConsumerCallback {
}
}
+ void onError(std::error_code ec) override {}
+
void doPing() {
Name interest_name(config_->name_, (uint32_t)sequence_number_);
hicn_format_t format;
@@ -298,7 +301,7 @@ class Client : implementation::BasePortal::ConsumerCallback {
private:
SendTimeMap send_timestamps_;
- implementation::BasePortal portal_;
+ interface::Portal portal_;
asio::signal_set signals_;
uint64_t sequence_number_;
uint64_t last_jump_;