1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-15 00:02:49 +03:00

LocalIP/LocalPort support

This commit is contained in:
aalku
2015-08-14 22:27:21 +02:00
committed by Ivan Grokhotkov
parent a2f3637ed4
commit acc34e2914
3 changed files with 30 additions and 0 deletions

View File

@ -125,6 +125,18 @@ class ClientContext {
return _pcb->remote_port;
}
uint32_t getLocalAddress() {
if(!_pcb) return 0;
return _pcb->local_ip.addr;
}
uint16_t getLocalPort() {
if(!_pcb) return 0;
return _pcb->local_port;
}
size_t getSize() const {
if(!_rx_buf) return 0;