Skip to content

Commit bf72f54

Browse files
committed
Remove unnecessary typedef for websocket client list
Fraction of commit f5e439c of dumbfixes branch of 0xFEEDC0DE64 fork of ESPAsyncWebServer. Split off for clarity.
1 parent c3e4ca1 commit bf72f54

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

src/AsyncWebSocket.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,10 +1331,6 @@ void AsyncWebSocket::_cleanBuffers()
13311331
}
13321332
}
13331333

1334-
const AsyncWebSocket::AsyncWebSocketClientLinkedList &AsyncWebSocket::getClients() const {
1335-
return _clients;
1336-
}
1337-
13381334
/*
13391335
* Response to Web Socket request - sends the authorization and detaches the TCP Client from the web server
13401336
* Authentication code from https://github.com/Links2004/arduinoWebSockets/blob/master/src/WebSockets.cpp#L480

src/AsyncWebSocket.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,11 +248,9 @@ typedef std::function<void(AsyncWebSocket * server, AsyncWebSocketClient * clien
248248

249249
//WebServer Handler implementation that plays the role of a socket server
250250
class AsyncWebSocket: public AsyncWebHandler {
251-
public:
252-
typedef std::list<AsyncWebSocketClient> AsyncWebSocketClientLinkedList;
253251
private:
254252
String _url;
255-
AsyncWebSocketClientLinkedList _clients;
253+
std::list<AsyncWebSocketClient> _clients;
256254
uint32_t _cNextId;
257255
AwsEventHandler _eventHandler;
258256
AwsHandshakeHandler _handshakeHandler;
@@ -344,7 +342,7 @@ class AsyncWebSocket: public AsyncWebHandler {
344342
std::list<AsyncWebSocketMessageBuffer> _buffers;
345343
void _cleanBuffers();
346344

347-
const AsyncWebSocketClientLinkedList &getClients() const;
345+
const std::list<AsyncWebSocketClient> &getClients() const { return _clients; }
348346
};
349347

350348
//WebServer response to authenticate the socket and detach the tcp client from the web server request

0 commit comments

Comments
 (0)