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

UDP multicast APIs fix

fix #74, fix #7
This commit is contained in:
Ivan Grokhotkov
2015-04-28 00:00:15 +08:00
parent 22f063b913
commit 727c61efe2
7 changed files with 60 additions and 18 deletions

View File

@ -94,6 +94,21 @@ public:
udp_disconnect(_pcb);
}
void setMulticastInterface(ip_addr_t addr)
{
// newer versions of lwip have a macro to set the multicast ip
// udp_set_multicast_netif_addr(_pcb, addr);
_pcb->multicast_ip = addr;
}
void setMulticastTTL(int ttl)
{
// newer versions of lwip have an additional field (mcast_ttl) for this purpose
// and a macro to set it instead of direct field access
// udp_set_multicast_ttl(_pcb, ttl);
_pcb->ttl = ttl;
}
size_t getSize() const
{
if (!_rx_buf)