Skip to content

Commit

Permalink
Added BOOST_USE_WINAPI_VERSION for boost 1.84
Browse files Browse the repository at this point in the history
  • Loading branch information
wsobel committed May 3, 2024
1 parent eb350cb commit 8c92d73
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions conan/profiles/vs32
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ include(default)
[settings]
compiler=msvc
compiler.cppstd=17
winver=0x0600
arch=x86
compiler.runtime=static
compiler.runtime_type=Release
Expand Down
1 change: 1 addition & 0 deletions conan/profiles/vs32debug
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ include(default)
[settings]
compiler=msvc
compiler.cppstd=17
winver=0x0600
arch=x86
compiler.runtime=static
compiler.runtime_type=Debug
Expand Down
1 change: 1 addition & 0 deletions conan/profiles/vs32shared
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ include(default)
compiler=msvc
compiler.cppstd=17
arch=x86
winver=0x0600
compiler.runtime=dynamic
compiler.runtime_type=Release
build_type=Release
Expand Down
3 changes: 2 additions & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class MTConnectAgentConan(ConanFile):
"with_ruby": True,
"development": False,
"shared": False,
"winver": "0x600",
"winver": "0x602",
"with_docs": False,
"cpack": False,
"agent_prefix": None,
Expand Down Expand Up @@ -227,6 +227,7 @@ def package_info(self):
winver=str(self.options.winver)
self.cpp_info.defines.append("WINVER=" + winver)
self.cpp_info.defines.append("_WIN32_WINNT=" + winver)
self.cpp_info.defines.append("BOOST_USE_WINAPI_VERSION=" + winver)

def package(self):
cmake = CMake(self)
Expand Down
14 changes: 7 additions & 7 deletions src/mtconnect/sink/rest_sink/websocket_session.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ namespace mtconnect::sink::rest_sink {

void close() override
{
//NAMED_SCOPE("PlainWebsocketSession::close");
NAMED_SCOPE("PlainWebsocketSession::close");
if (!m_isOpen)
return;

Expand Down Expand Up @@ -128,7 +128,7 @@ namespace mtconnect::sink::rest_sink {

void writeResponse(ResponsePtr &&response, Complete complete = nullptr) override
{
//NAMED_SCOPE("WebsocketSession::writeResponse");
NAMED_SCOPE("WebsocketSession::writeResponse");
if (!response->m_requestId)
{
boost::system::error_code ec;
Expand All @@ -140,7 +140,7 @@ namespace mtconnect::sink::rest_sink {

void writeFailureResponse(ResponsePtr &&response, Complete complete = nullptr) override
{
//NAMED_SCOPE("WebsocketSession::writeFailureResponse");
NAMED_SCOPE("WebsocketSession::writeFailureResponse");
writeChunk(response->m_body, complete, response->m_requestId);
}

Expand Down Expand Up @@ -175,7 +175,7 @@ namespace mtconnect::sink::rest_sink {
void writeChunk(const std::string &chunk, Complete complete,
std::optional<std::string> requestId = std::nullopt) override
{
//NAMED_SCOPE("WebsocketSession::writeChunk");
NAMED_SCOPE("WebsocketSession::writeChunk");

if (!derived().stream().is_open())
{
Expand Down Expand Up @@ -219,7 +219,7 @@ namespace mtconnect::sink::rest_sink {

void send(const std::string body, Complete complete, const std::string &requestId)
{
//NAMED_SCOPE("WebsocketSession::send");
NAMED_SCOPE("WebsocketSession::send");

using namespace std::placeholders;

Expand Down Expand Up @@ -255,7 +255,7 @@ namespace mtconnect::sink::rest_sink {

void sent(beast::error_code ec, std::size_t len, const std::string &id)
{
//NAMED_SCOPE("WebsocketSession::sent");
NAMED_SCOPE("WebsocketSession::sent");

if (ec)
{
Expand Down Expand Up @@ -310,7 +310,7 @@ namespace mtconnect::sink::rest_sink {

void onRead(beast::error_code ec, std::size_t len)
{
//NAMED_SCOPE("PlainWebsocketSession::onRead");
NAMED_SCOPE("PlainWebsocketSession::onRead");

if (ec)
return fail(boost::beast::http::status::internal_server_error, "shutdown", ec);
Expand Down

0 comments on commit 8c92d73

Please sign in to comment.