From a5ce68f9b74f0f765a1ad4d14446d9a336f39860 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Tue, 31 Oct 2023 13:35:50 +0100 Subject: [PATCH] Add WiFiServer::stop() and WiFiServer::end() --- libraries/SocketWrapper/src/MbedServer.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libraries/SocketWrapper/src/MbedServer.h b/libraries/SocketWrapper/src/MbedServer.h index 23017e296..6b6362376 100644 --- a/libraries/SocketWrapper/src/MbedServer.h +++ b/libraries/SocketWrapper/src/MbedServer.h @@ -41,13 +41,15 @@ class MbedServer : public arduino::Server { MbedServer(uint16_t port) : _port(port){}; - virtual ~MbedServer() { + virtual ~MbedServer() { end(); } + void begin(); + void end() { if (sock) { delete sock; sock = nullptr; } - } - void begin(); + }; + void stop() { end(); }; virtual size_t write(uint8_t); virtual size_t write(const uint8_t *buf, size_t size); uint8_t status(); pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy