From bf72f5484c6e55fb941fffebfae73757ff8dd2b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Villac=C3=ADs=20Lasso?= Date: Tue, 29 Dec 2020 18:10:26 -0500 Subject: [PATCH] Remove unnecessary typedef for websocket client list Fraction of commit f5e439c8f86609c3be855b76844352322e366b80 of dumbfixes branch of 0xFEEDC0DE64 fork of ESPAsyncWebServer. Split off for clarity. --- src/AsyncWebSocket.cpp | 4 ---- src/AsyncWebSocket.h | 6 ++---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/AsyncWebSocket.cpp b/src/AsyncWebSocket.cpp index ff4db1d..c1c7900 100644 --- a/src/AsyncWebSocket.cpp +++ b/src/AsyncWebSocket.cpp @@ -1331,10 +1331,6 @@ void AsyncWebSocket::_cleanBuffers() } } -const AsyncWebSocket::AsyncWebSocketClientLinkedList &AsyncWebSocket::getClients() const { - return _clients; -} - /* * Response to Web Socket request - sends the authorization and detaches the TCP Client from the web server * Authentication code from https://github.com/Links2004/arduinoWebSockets/blob/master/src/WebSockets.cpp#L480 diff --git a/src/AsyncWebSocket.h b/src/AsyncWebSocket.h index 4818447..414c5ff 100644 --- a/src/AsyncWebSocket.h +++ b/src/AsyncWebSocket.h @@ -248,11 +248,9 @@ typedef std::function AsyncWebSocketClientLinkedList; private: String _url; - AsyncWebSocketClientLinkedList _clients; + std::list _clients; uint32_t _cNextId; AwsEventHandler _eventHandler; AwsHandshakeHandler _handshakeHandler; @@ -344,7 +342,7 @@ class AsyncWebSocket: public AsyncWebHandler { std::list _buffers; void _cleanBuffers(); - const AsyncWebSocketClientLinkedList &getClients() const; + const std::list &getClients() const { return _clients; } }; //WebServer response to authenticate the socket and detach the tcp client from the web server request