Unverified Commit 39043b85 authored by Juraj Andrássy's avatar Juraj Andrássy Committed by GitHub

WiFiServer - don't inherit from Print and Server (#8930)

because print-to-all-clients is not implemented
Co-authored-by: default avatarRodrigo Garcia <rodrigo.garcia@espressif.com>
Co-authored-by: default avatarMe No Dev <me-no-dev@users.noreply.github.com>
parent e73af48e
......@@ -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();
}
......
......@@ -24,7 +24,7 @@
#include "WiFiClient.h"
#include "IPAddress.h"
class WiFiServer : public Server {
class WiFiServer {
private:
int sockfd;
int _accepted_sockfd = -1;
......@@ -51,18 +51,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_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment