Avoid deprecated Boost.Asio interfaces
Change-Id: I00d285893ff61619f49dff8a8a55d0d0e2c309a7
diff --git a/tests/integration/face.cpp b/tests/integration/face.cpp
index 7bd2408..a759e35 100644
--- a/tests/integration/face.cpp
+++ b/tests/integration/face.cpp
@@ -68,7 +68,7 @@
protected:
FaceFixture()
: face(TransportType::create(""), m_keyChain)
- , sched(face.getIoService())
+ , sched(face.getIoContext())
{
}
@@ -82,7 +82,7 @@
sendInterest(time::nanoseconds delay, const Interest& interest, char& outcome)
{
if (face2 == nullptr) {
- face2 = make_unique<Face>(TransportType::create(""), face.getIoService(), m_keyChain);
+ face2 = make_unique<Face>(TransportType::create(""), face.getIoContext(), m_keyChain);
}
outcome = '?';
@@ -101,13 +101,13 @@
return sendInterest(delay, interest, ignoredOutcome);
}
- /** \brief Stop io_service after a delay
+ /** \brief Stop io_context after a delay
* \return scheduled event id
*/
scheduler::EventId
terminateAfter(time::nanoseconds delay)
{
- return sched.schedule(delay, [this] { face.getIoService().stop(); });
+ return sched.schedule(delay, [this] { face.getIoContext().stop(); });
}
protected:
diff --git a/tests/integration/network-monitor.cpp b/tests/integration/network-monitor.cpp
index cf6d8bd..ff4d932 100644
--- a/tests/integration/network-monitor.cpp
+++ b/tests/integration/network-monitor.cpp
@@ -30,7 +30,7 @@
#include "ndn-cxx/util/string-helper.hpp"
#include "ndn-cxx/util/time.hpp"
-#include <boost/asio/io_service.hpp>
+#include <boost/asio/io_context.hpp>
#include <iostream>
namespace ndn::tests {
@@ -48,7 +48,7 @@
BOOST_AUTO_TEST_CASE(Signals)
{
- boost::asio::io_service io;
+ boost::asio::io_context io;
NetworkMonitor monitor(io);
std::cout << "capabilities=" << AsHex{monitor.getCapabilities()} << std::endl;