UDP: User Datagram Protocol¶
https://en.m.wikipedia.org/wiki/User_Datagram_Protocol
Connection API¶
-
using
UdpConnectionDataDelegate
= Delegate<void(UdpConnection &connection, char *data, int size, IpAddress remoteIP, uint16_t remotePort)>¶
-
class
UdpConnection
: public IpConnection¶ - #include <UdpConnection.h>
Subclassed by DnsServer, mDNS::Server, NtpClient
Public Functions
-
bool
setMulticast
(IpAddress ip)¶ Sets the UDP multicast IP.
- Note
This method works only when LWIP is compiled with LWIP_MULTICAST_TX_OPTIONS
- Parameters
ip
:
- Return Value
true
: when LWIP supports this operation, false otherwise
-
bool
setMulticastTtl
(size_t ttl)¶ Sets the UDP multicast Time-To-Live(TTL).
- Note
This method works only when LWIP is compiled with LWIP_MULTICAST_TX_OPTIONS
- Parameters
ttl
: - time to live in hops. For example if a milticast UDP packet needs to pass through two routes to reach the receiver then the TTL should be set to 2
- Return Value
true
: when LWIP supports this operation, false otherwise
-
bool