1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-13 13:01:55 +03:00

Add remoteIP and remotePort methods to WiFiClient

This commit is contained in:
Ivan Grokhotkov
2015-01-16 17:56:11 +03:00
parent e40d18e107
commit b09e8e593a
3 changed files with 37 additions and 4 deletions

View File

@ -88,6 +88,22 @@ public:
}
}
uint32_t getRemoteAddress()
{
if (!_pcb)
return 0;
return _pcb->remote_ip.addr;
}
uint16_t getRemotePort()
{
if (!_pcb)
return 0;
return _pcb->remote_port;
}
size_t getSize() const
{
if (!_rx_buf)