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:
@ -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;
|
||||
|
Reference in New Issue
Block a user