PeerNet.Discovery.UDP.Transport.GenUDP (PeerNet v0.1.0)

Copy Markdown View Source

Production transport for PeerNet.Discovery.UDP — wraps Erlang :gen_udp with broadcast enabled.

Opens the socket bound to 0.0.0.0:port so it receives broadcasts arriving on any local interface. Uses reuseaddr: true so multiple PeerNet instances on the same host can share the listen port if the OS allows it (Linux + macOS with SO_REUSEPORT).