pub(crate) const UDP_DISCOVERY_PORT: u16 = 47891;Expand description
UDP broadcast discovery fallback (Layer 2), for LANs where mDNS multicast is filtered (common on corporate/guest WiFi). Mobile clients broadcast a small JSON probe to this port; any listening desktop instance unicasts a response straight back to the sender’s source address.
Port 47891 is picked from the “ephemeral-safe-but-memorable” range: above both the well-known (0-1023) and IANA-registered (1024-49151) ranges, so it never collides with a registered service, while still being a fixed, easy-to-grep value in logs and firewall rules (unlike a random ephemeral port, which a fixed-port broadcast probe cannot target).