1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

WiFiServer - operator bool() and method end() (#8995)

This commit is contained in:
Juraj Andrássy 2023-11-04 23:39:46 +01:00 committed by GitHub
parent 497dacc78f
commit 30c6df4639
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -173,6 +173,14 @@ void WiFiServer::stop() {
close(); close();
} }
void WiFiServer::end() {
close();
}
WiFiServer::operator bool() {
return (status() != CLOSED);
}
err_t WiFiServer::_accept(tcp_pcb* apcb, err_t err) { err_t WiFiServer::_accept(tcp_pcb* apcb, err_t err) {
(void) err; (void) err;
DEBUGV("WS:ac\r\n"); DEBUGV("WS:ac\r\n");

View File

@ -100,6 +100,8 @@ public:
uint16_t port() const; uint16_t port() const;
void close(); void close();
void stop(); void stop();
void end();
explicit operator bool();
using ClientType = WiFiClient; using ClientType = WiFiClient;