From 4f70b54c640e4175685865eccc45476c8473aba5 Mon Sep 17 00:00:00 2001 From: Ewoud Date: Tue, 2 Jul 2024 22:14:40 +0200 Subject: [PATCH 1/2] Add queueLength() --- src/AsyncWebSocket.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/AsyncWebSocket.h b/src/AsyncWebSocket.h index d84879334..9e0554d17 100644 --- a/src/AsyncWebSocket.h +++ b/src/AsyncWebSocket.h @@ -209,6 +209,9 @@ class AsyncWebSocketClient { //data packets void message(AsyncWebSocketMessage *message){ _queueMessage(message); } bool queueIsFull(); + size_t queueLength() { //added by ewowi + return _messageQueue.length(); + } size_t printf(const char *format, ...) __attribute__ ((format (printf, 2, 3))); #ifndef ESP32 From da0c1f5655360f31bd2f93960e906424f1df1c7f Mon Sep 17 00:00:00 2001 From: Ewoud Date: Thu, 3 Oct 2024 12:39:20 +0200 Subject: [PATCH 2/2] add queueLen --- src/AsyncWebSocket.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/AsyncWebSocket.h b/src/AsyncWebSocket.h index 9e0554d17..5062e864a 100644 --- a/src/AsyncWebSocket.h +++ b/src/AsyncWebSocket.h @@ -212,6 +212,9 @@ class AsyncWebSocketClient { size_t queueLength() { //added by ewowi return _messageQueue.length(); } + size_t queueLen() { //added by ewowi, compatible with https://github.com/mathieucarbou/ESPAsyncWebServer.git + return _messageQueue.length(); + } size_t printf(const char *format, ...) __attribute__ ((format (printf, 2, 3))); #ifndef ESP32