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

WiFiServer - allow constructor without parameters (#9026)

This commit is contained in:
Juraj Andrássy 2023-11-13 00:10:26 +01:00 committed by GitHub
parent d0f7293491
commit ee953737dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View File

@ -18,6 +18,11 @@ For most use cases the basic WiFiServer class of the ESP8266WiFi library is suit
Methods and properties described further down are specific to ESP8266. They are not covered in `Arduino WiFi library <https://www.arduino.cc/en/Reference/WiFi>`__ documentation. Before they are fully documented please refer to information below.
begin(port)
~~~~~~~~~~~
Additionally to ``begin()`` without parameter and a constructor with parameter ``port``, ESP8266WiFi library has ``begin(uint16_t port)`` and a constructor without parameters. If port is not specified with constructor and ``begin`` without parameter is used, the server is started on port 23.
accept
~~~~~~

View File

@ -32,7 +32,7 @@ class ArduinoCompatibleWiFiServerTemplate : public TServer, public Print {
public:
ArduinoCompatibleWiFiServerTemplate(const IPAddress& addr, uint16_t port) : TServer(addr, port) {}
ArduinoCompatibleWiFiServerTemplate(uint16_t port) : TServer(port) {}
ArduinoCompatibleWiFiServerTemplate(uint16_t port = 23) : TServer(port) {}
virtual ~ArduinoCompatibleWiFiServerTemplate() {}
// https://www.arduino.cc/en/Reference/WiFiServerAvailable

View File

@ -79,7 +79,7 @@ protected:
public:
WiFiServer(const IPAddress& addr, uint16_t port);
WiFiServer(uint16_t port);
WiFiServer(uint16_t port = 23);
virtual ~WiFiServer() {}
WiFiClient accept(); // https://www.arduino.cc/en/Reference/EthernetServerAccept
WiFiClient available(uint8_t* status = NULL) __attribute__((deprecated("Renamed to accept().")));