♻️ Replaces JsonObject with JsonVariant
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
|
||||
enum message_type_t { CONNECT = 0, DISCONNECT = 1, EVENT = 2, PING = 3, PONG = 4, BINARY_EVENT = 5 };
|
||||
|
||||
typedef std::function<void(JsonObject &root, int originId)> EventCallback;
|
||||
typedef std::function<void(JsonVariant &root, int originId)> EventCallback;
|
||||
typedef std::function<void(const String &originId, bool sync)> SubscribeCallback;
|
||||
|
||||
class EventSocket {
|
||||
@@ -32,7 +32,7 @@ class EventSocket {
|
||||
std::map<String, std::list<int>> client_subscriptions;
|
||||
std::map<String, std::list<EventCallback>> event_callbacks;
|
||||
std::map<String, std::list<SubscribeCallback>> subscribe_callbacks;
|
||||
void handleEventCallbacks(String event, JsonObject &jsonObject, int originId);
|
||||
void handleEventCallbacks(String event, JsonVariant &jsonObject, int originId);
|
||||
void send(PsychicWebSocketClient *client, const char *data, size_t len);
|
||||
void handleSubscribeCallbacks(String event, const String &originId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user