Make conceptual pub/sub changes for v19

This commit is contained in:
Alex Hultman
2021-04-10 17:22:16 +02:00
parent 9d8e37d8a4
commit 65d1498774
3 changed files with 59 additions and 26 deletions
+5
View File
@@ -20,6 +20,7 @@
#include "MoveOnlyFunction.h"
#include <string_view>
#include <vector>
#include "WebSocketProtocol.h"
#include "TopicTree.h"
@@ -46,6 +47,10 @@ private:
};
public:
/* All WebSocketContextData holds a list to all other WebSocketContextData in this app.
* We cannot type it USERDATA since different WebSocketContextData can have different USERDATA. */
std::vector<WebSocketContextData<SSL, int> *> adjacentWebSocketContextDatas;
/* The callbacks for this context */
MoveOnlyFunction<void(WebSocket<SSL, true, USERDATA> *)> openHandler = nullptr;
MoveOnlyFunction<void(WebSocket<SSL, true, USERDATA> *, std::string_view, OpCode)> messageHandler = nullptr;