update ASIO interfaces
This commit does 2 things.
1. Upgrades and prepares bmcweb for boost 1.70.
2. Allows us to compile with BOOST_AIO_NO_DEPRECATED
Tested: Compiled against 1.69 and 1.70. All changes should be no-op.
Change-Id: I557ecd840fe2b88c0fa01978a1b666b40ccccca4
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
diff --git a/include/kvm_websocket.hpp b/include/kvm_websocket.hpp
index 8034ba7..d0c5539 100644
--- a/include/kvm_websocket.hpp
+++ b/include/kvm_websocket.hpp
@@ -137,7 +137,7 @@
if (hostSocket == nullptr)
{
boost::asio::ip::tcp::endpoint endpoint(
- boost::asio::ip::address::from_string("127.0.0.1"), 5900);
+ boost::asio::ip::make_address("127.0.0.1"), 5900);
hostSocket = std::make_unique<boost::asio::ip::tcp::socket>(
conn.get_io_context());
@@ -148,8 +148,13 @@
[](crow::websocket::Connection& conn, const std::string& reason) {
session = nullptr;
hostSocket = nullptr;
+#if BOOST_VERSION >= 107000
+ inputBuffer.clear();
+ outputBuffer.clear();
+#else
inputBuffer.reset();
outputBuffer.reset();
+#endif
})
.onmessage([](crow::websocket::Connection& conn,
const std::string& data, bool is_binary) {