1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-11 15:22:13 +03:00

Add destinationIP method to WiFiUDP

Might be useful to distinguish between normal and multicast packets arriving at the same port (#105)
This commit is contained in:
Ivan Grokhotkov
2015-04-28 00:03:29 +08:00
parent 727c61efe2
commit 5354464a01
4 changed files with 25 additions and 3 deletions

View File

@ -240,6 +240,17 @@ uint16_t WiFiUDP::remotePort()
return _ctx->getRemotePort();
}
IPAddress WiFiUDP::destinationIP()
{
IPAddress addr;
if (!_ctx)
return addr;
addr = _ctx->getDestAddress();
return addr;
}
uint16_t WiFiUDP::localPort()
{
if (!_ctx)