Depend on the independent Asio instead of Boost.Asio by default #382
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #367
Motivation
See the difference of Asio and Boost.Asio here: https://think-async.com/Asio/AsioAndBoostAsio.html
Asio is updated more frequently than Boost.Asio and its release does not need to be synchronous with other Boost components. Depending on the independent Asio could make it easier for a newer Asio release.
Modifications
Import
asio
1.28.2 as the dependency and remove theboost-asio
dependency from the vcpkg.json. Since the latest Asio already removed thedeadline_timer
, this patch replaces alldeadline_timer
withsteady_timer
, which usesstd::chrono
rather than Boost.Date_Time component to compute the timeout.Add a
USE_ASIO
CMake option to determine whether Asio or Boost.Asio is depended. For vcpkg users, the option is always enabled.Finally, simplify the vcpkg.json by removing some
boost-*
dependencies depended indirectly by the rest two major dependencies:These two dependencies are hard to remove for now unless introducing other dependencies so they will be kept from some time.