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

Add support for multicast UDP

This commit is contained in:
Ivan Grokhotkov
2015-02-01 01:52:23 +03:00
parent aa6e0ce54f
commit c28a63c9d5
3 changed files with 49 additions and 2 deletions

View File

@ -194,7 +194,7 @@ public:
return size;
}
void send()
void send(ip_addr_t* addr = 0, uint16_t port = 0)
{
size_t orig_size = _tx_buf_head->tot_len;
@ -209,7 +209,10 @@ public:
}
}
udp_send(_pcb, _tx_buf_head);
if (addr)
udp_sendto(_pcb, _tx_buf_head, addr, port);
else
udp_send(_pcb, _tx_buf_head);
for (pbuf* p = _tx_buf_head; p; p = p->next)
{