Matter::MDNS::MulticastSocket
Inherits Reference < Object
MulticastSocket for mDNS communication
Provides UDP multicast I/O on port 5353 for mDNS (Multicast DNS). Supports both IPv4 (224.0.0.251) and IPv6 (ff02::fb) multicast groups.
RFC 6762 §5.1: Multicast DNS uses port 5353 on both IPv4 and IPv6
Constants
mDNS multicast addresses
TTL for multicast packets (RFC 6762 §11: SHOULD be 255)
Constructors
Instance methods
Join the mDNS multicast group
RFC 6762 §5.1: All mDNS responders and queriers MUST join the multicast group
Receive data with a timeout
@param buffer Buffer to receive data into @param timeout Timeout duration @return Tuple of (bytes_received, sender_address) or nil if timeout
Receive data from the multicast group
@param buffer Buffer to receive data into @return Tuple of (bytes_received, sender_address)
Send data to the mDNS multicast group
@param data The DNS packet bytes to send @return Number of bytes sent