File tree Expand file tree Collapse file tree 8 files changed +28
-22
lines changed Expand file tree Collapse file tree 8 files changed +28
-22
lines changed Original file line number Diff line number Diff line change 1
1
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
2
2
/*
3
- * Copyright (c) 2012-2019 University of California, Los Angeles
3
+ * Copyright (c) 2012-2023 University of California, Los Angeles
4
4
*
5
5
* This file is part of ChronoSync, synchronization library for distributed realtime
6
6
* applications for NDN.
26
26
27
27
namespace chronosync {
28
28
29
- InterestTable::InterestTable (boost::asio::io_service & io)
29
+ InterestTable::InterestTable (boost::asio::io_context & io)
30
30
: m_scheduler(io)
31
31
{
32
32
}
Original file line number Diff line number Diff line change 1
1
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
2
2
/*
3
- * Copyright (c) 2012-2021 University of California, Los Angeles
3
+ * Copyright (c) 2012-2023 University of California, Los Angeles
4
4
*
5
5
* This file is part of ChronoSync, synchronization library for distributed realtime
6
6
* applications for NDN.
27
27
28
28
#include " interest-container.hpp"
29
29
30
- #include < boost/asio/io_service .hpp>
30
+ #include < boost/asio/io_context .hpp>
31
31
32
32
namespace chronosync {
33
33
34
34
/* *
35
- * @brief A table to keep unsatisfied Sync Interest
35
+ * @brief A table to keep unsatisfied Sync Interests.
36
36
*/
37
37
class InterestTable : noncopyable
38
38
{
@@ -47,7 +47,7 @@ class InterestTable : noncopyable
47
47
using const_iterator = InterestContainer::const_iterator;
48
48
49
49
explicit
50
- InterestTable (boost::asio::io_service & io);
50
+ InterestTable (boost::asio::io_context & io);
51
51
52
52
~InterestTable ();
53
53
Original file line number Diff line number Diff line change 1
1
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
2
2
/*
3
- * Copyright (c) 2012-2022 University of California, Los Angeles
3
+ * Copyright (c) 2012-2023 University of California, Los Angeles
4
4
*
5
5
* This file is part of ChronoSync, synchronization library for distributed realtime
6
6
* applications for NDN.
22
22
23
23
#include < ndn-cxx/util/time-unit-test-clock.hpp>
24
24
25
- #include < boost/asio.hpp>
25
+ #include < boost/asio/io_context .hpp>
26
26
27
27
namespace ndn ::tests {
28
28
@@ -42,22 +42,23 @@ class UnitTestTimeFixture
42
42
}
43
43
44
44
void
45
- advanceClocks (const time::nanoseconds& tick, size_t nTicks = 1 )
45
+ advanceClocks (time::nanoseconds tick, size_t nTicks = 1 )
46
46
{
47
47
for (size_t i = 0 ; i < nTicks; ++i) {
48
48
steadyClock->advance (tick);
49
49
systemClock->advance (tick);
50
50
51
- if (io.stopped ())
52
- io.reset ();
51
+ if (io.stopped ()) {
52
+ io.restart ();
53
+ }
53
54
io.poll ();
54
55
}
55
56
}
56
57
57
58
public:
58
59
shared_ptr<time::UnitTestSteadyClock> steadyClock;
59
60
shared_ptr<time::UnitTestSystemClock> systemClock;
60
- boost::asio::io_service io;
61
+ boost::asio::io_context io;
61
62
};
62
63
63
64
} // namespace ndn::tests
Original file line number Diff line number Diff line change 19
19
20
20
#include " dummy-forwarder.hpp"
21
21
22
- #include < boost/asio/io_service.hpp>
22
+ #include < boost/asio/io_context.hpp>
23
+ #include < boost/asio/post.hpp>
23
24
24
25
namespace ndn {
25
26
namespace chronosync {
26
27
27
- DummyForwarder::DummyForwarder (boost::asio::io_service & io, KeyChain& keyChain)
28
+ DummyForwarder::DummyForwarder (boost::asio::io_context & io, KeyChain& keyChain)
28
29
: m_io(io)
29
30
, m_keyChain(keyChain)
30
31
{
@@ -42,7 +43,7 @@ DummyForwarder::addFace()
42
43
if (self == &*otherFace) {
43
44
continue ;
44
45
}
45
- m_io. post ([=] { otherFace->receive (i); });
46
+ boost::asio:: post (m_io, [=] { otherFace->receive (i); });
46
47
}
47
48
});
48
49
@@ -52,7 +53,7 @@ DummyForwarder::addFace()
52
53
if (self == &*otherFace) {
53
54
continue ;
54
55
}
55
- m_io. post ([=] { otherFace->receive (d); });
56
+ boost::asio:: post (m_io, [=] { otherFace->receive (d); });
56
57
}
57
58
});
58
59
@@ -62,7 +63,7 @@ DummyForwarder::addFace()
62
63
if (self == &*otherFace) {
63
64
continue ;
64
65
}
65
- m_io. post ([=] { otherFace->receive (n); });
66
+ boost::asio:: post (m_io, [=] { otherFace->receive (n); });
66
67
}
67
68
});
68
69
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ namespace chronosync {
38
38
class DummyForwarder
39
39
{
40
40
public:
41
- DummyForwarder (boost::asio::io_service & io, KeyChain& keyChain);
41
+ DummyForwarder (boost::asio::io_context & io, KeyChain& keyChain);
42
42
43
43
Face&
44
44
addFace ();
@@ -53,7 +53,7 @@ class DummyForwarder
53
53
removeFaces ();
54
54
55
55
private:
56
- boost::asio::io_service & m_io;
56
+ boost::asio::io_context & m_io;
57
57
KeyChain& m_keyChain;
58
58
std::vector<std::shared_ptr<DummyClientFace>> m_faces;
59
59
};
Original file line number Diff line number Diff line change @@ -363,7 +363,7 @@ BOOST_AUTO_TEST_CASE(CancelOutstandingEvents)
363
363
systemClock->advance (ndn::time::hours (1 ));
364
364
365
365
BOOST_CHECK_EQUAL (io.poll (), 0 ); // no delayed handlers are expected
366
- BOOST_CHECK_EQUAL (io.stopped (), true ); // io_service expected to be stopped
366
+ BOOST_CHECK_EQUAL (io.stopped (), true ); // io_context expected to be stopped
367
367
}
368
368
369
369
BOOST_FIXTURE_TEST_CASE (TrimState, ndn::tests::IdentityManagementTimeFixture)
Original file line number Diff line number Diff line change 1
1
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
2
2
/*
3
- * Copyright (c) 2012-2022 University of California, Los Angeles
3
+ * Copyright (c) 2012-2023 University of California, Los Angeles
4
4
*
5
5
* This file is part of ChronoSync, synchronization library for distributed realtime
6
6
* applications for NDN.
@@ -72,7 +72,7 @@ class MultiUserFixture
72
72
Name syncPrefix;
73
73
Name userPrefix[3 ];
74
74
75
- boost::asio::io_service io;
75
+ boost::asio::io_context io;
76
76
shared_ptr<ndn::Face> face;
77
77
ndn::Scheduler scheduler;
78
78
shared_ptr<Handler> handler;
Original file line number Diff line number Diff line change @@ -38,6 +38,10 @@ def configure(conf):
38
38
uselib_store = 'NDN_CXX' , pkg_config_path = pkg_config_path )
39
39
40
40
conf .check_boost (lib = 'iostreams' , mt = True )
41
+ if conf .env .BOOST_VERSION_NUMBER < 107100 :
42
+ conf .fatal ('The minimum supported version of Boost is 1.71.0.\n '
43
+ 'Please upgrade your distribution or manually install a newer version of Boost.\n '
44
+ 'For more information, see https://redmine.named-data.net/projects/nfd/wiki/Boost' )
41
45
42
46
if conf .env .WITH_TESTS :
43
47
conf .check_boost (lib = 'filesystem unit_test_framework' , mt = True , uselib_store = 'BOOST_TESTS' )
You can’t perform that action at this time.
0 commit comments