summaryrefslogtreecommitdiff
path: root/include/kvm_websocket.hpp
diff options
context:
space:
mode:
authorEd Tanous <ed.tanous@intel.com>2019-03-14 02:23:37 +0300
committerEd Tanous <ed.tanous@intel.com>2019-03-29 23:41:09 +0300
commite278c18fc22faa2e5099f3f43a813942144c7560 (patch)
tree49071083c913f58f8fc5873a55d1aa3b2ed10576 /include/kvm_websocket.hpp
parentd265304eda0053cd45d21aa7a269cc2212fd8d24 (diff)
downloadbmcweb-e278c18fc22faa2e5099f3f43a813942144c7560.tar.xz
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>
Diffstat (limited to 'include/kvm_websocket.hpp')
-rw-r--r--include/kvm_websocket.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/kvm_websocket.hpp b/include/kvm_websocket.hpp
index 8034ba77f4..d0c5539dd0 100644
--- a/include/kvm_websocket.hpp
+++ b/include/kvm_websocket.hpp
@@ -137,7 +137,7 @@ inline void requestRoutes(CrowApp& app)
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 @@ inline void requestRoutes(CrowApp& app)
[](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) {