1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-10 04:22:05 +03:00

Updating _port to really used port and made _port accessible (#7003)

* Updating _port to really used port and made _port accessible

* 2. Try
This commit is contained in:
LaborEtArs
2020-01-09 01:36:39 +01:00
committed by Develo
parent b4d2ab102b
commit 5e537e5783
2 changed files with 6 additions and 0 deletions

View File

@ -83,6 +83,7 @@ void WiFiServer::begin(uint16_t port) {
return;
}
_pcb = listen_pcb;
_port = _pcb->local_port;
tcp_accept(listen_pcb, &WiFiServer::_s_accept);
tcp_arg(listen_pcb, (void*) this);
}
@ -126,6 +127,10 @@ uint8_t WiFiServer::status() {
return _pcb->state;
}
uint16_t WiFiServer::port() const {
return _port;
}
void WiFiServer::close() {
if (!_pcb) {
return;