mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-07 16:23:38 +03:00
Added WifiServer::begin(uint16_t port) method, listening port can be changed at runtime (#4123)
This commit is contained in:
parent
2c8b2b92ce
commit
8765da258b
@ -56,7 +56,12 @@ WiFiServer::WiFiServer(uint16_t port)
|
||||
}
|
||||
|
||||
void WiFiServer::begin() {
|
||||
begin(_port);
|
||||
}
|
||||
|
||||
void WiFiServer::begin(uint16_t port) {
|
||||
close();
|
||||
_port = port;
|
||||
err_t err;
|
||||
tcp_pcb* pcb = tcp_new();
|
||||
if (!pcb)
|
||||
|
@ -51,6 +51,7 @@ public:
|
||||
WiFiClient available(uint8_t* status = NULL);
|
||||
bool hasClient();
|
||||
void begin();
|
||||
void begin(uint16_t port);
|
||||
void setNoDelay(bool nodelay);
|
||||
bool getNoDelay();
|
||||
virtual size_t write(uint8_t);
|
||||
|
Loading…
x
Reference in New Issue
Block a user