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 <jwoos@meta.com>
This commit is contained in:
Jun Woo Shin
2022-11-04 01:36:43 -04:00
committed by GitHub
parent 624c217d34
commit b6604b2996
2 changed files with 12 additions and 14 deletions
-12
View File
@@ -23,18 +23,6 @@
#include <string_view>
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 */
+12 -2
View File
@@ -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 <bool, bool, typename> struct WebSocket;
struct TopicTreeMessage;
struct TopicTreeBigMessage;
/* todo: this looks identical to WebSocketBehavior, why not just std::move that entire thing in? */