From b6604b29964ce95fedebc8bdf2beadf07f6b92b0 Mon Sep 17 00:00:00 2001 From: Jun Woo Shin Date: Fri, 4 Nov 2022 01:36:43 -0400 Subject: [PATCH] Move TopicTreeMessage and TopicTreeBigMessage to TopicTree.h (#1510) * Move TopicTreeMessage and TopicTreeBigMessage to TopicTree.h * Move TopicTreeMessage and TopicTreeBigMessage to WebSocketContextData per comment Co-authored-by: Jun Woo Shin --- src/App.h | 12 ------------ src/WebSocketContextData.h | 14 ++++++++++++-- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/App.h b/src/App.h index 751fd16..6a14529 100644 --- a/src/App.h +++ b/src/App.h @@ -23,18 +23,6 @@ #include namespace uWS { - /* Type queued up when publishing */ - struct TopicTreeMessage { - std::string message; - /*OpCode*/ int opCode; - bool compress; - }; - struct TopicTreeBigMessage { - std::string_view message; - /*OpCode*/ int opCode; - bool compress; - }; - /* Safari 15.0 - 15.3 has a completely broken compression implementation (client_no_context_takeover not * properly implemented) - so we fully disable compression for this browser :-( * see https://github.com/uNetworking/uWebSockets/issues/1347 */ diff --git a/src/WebSocketContextData.h b/src/WebSocketContextData.h index 9301f3d..49049db 100644 --- a/src/WebSocketContextData.h +++ b/src/WebSocketContextData.h @@ -31,9 +31,19 @@ namespace uWS { +/* Type queued up when publishing */ +struct TopicTreeMessage { + std::string message; + /*OpCode*/ int opCode; + bool compress; +}; +struct TopicTreeBigMessage { + std::string_view message; + /*OpCode*/ int opCode; + bool compress; +}; + template struct WebSocket; -struct TopicTreeMessage; -struct TopicTreeBigMessage; /* todo: this looks identical to WebSocketBehavior, why not just std::move that entire thing in? */