From 978249f49793426454fec6dd430e0486b7e8025c Mon Sep 17 00:00:00 2001 From: Juraj Andrassy Date: Tue, 28 Nov 2023 07:07:58 +0100 Subject: [PATCH] WiFiServer - don't inherit from Print and Server because print-to-all-clients is not implemented --- libraries/WiFi/src/WiFiServer.cpp | 6 ------ libraries/WiFi/src/WiFiServer.h | 8 +------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/libraries/WiFi/src/WiFiServer.cpp b/libraries/WiFi/src/WiFiServer.cpp index ef59cf14d6d..d5519dc33ef 100644 --- a/libraries/WiFi/src/WiFiServer.cpp +++ b/libraries/WiFi/src/WiFiServer.cpp @@ -32,12 +32,6 @@ int WiFiServer::setTimeout(uint32_t seconds){ return setsockopt(sockfd, SOL_SOCKET, SO_SNDTIMEO, (char *)&tv, sizeof(struct timeval)); } -size_t WiFiServer::write(const uint8_t *data, size_t len){ - return 0; -} - -void WiFiServer::stopAll(){} - WiFiClient WiFiServer::available(){ return accept(); } diff --git a/libraries/WiFi/src/WiFiServer.h b/libraries/WiFi/src/WiFiServer.h index b9db726b9b7..15523a888b4 100644 --- a/libraries/WiFi/src/WiFiServer.h +++ b/libraries/WiFi/src/WiFiServer.h @@ -24,7 +24,7 @@ #include "WiFiClient.h" #include "IPAddress.h" -class WiFiServer : public Server { +class WiFiServer { private: int sockfd; int _accepted_sockfd = -1; @@ -52,18 +52,12 @@ class WiFiServer : public Server { void setNoDelay(bool nodelay); bool getNoDelay(); bool hasClient(); - size_t write(const uint8_t *data, size_t len); - size_t write(uint8_t data){ - return write(&data, 1); - } - using Print::write; void end(); void close(); void stop(); operator bool(){return _listening;} int setTimeout(uint32_t seconds); - void stopAll(); }; #endif /* _WIFISERVER_H_ */