Xirsys.XTurn.DatagramListener (xturn v2.0.0)

Copy Markdown View Source

UDP listener that registers bound endpoints in ListenRegistry.

What problem this solves

SO_REUSEPORT spreads UDP receives across shards, but RFC 5780 needs a stable {transport, socket} for alternate-source Binding replies. This wrapper starts DatagramServer and registers {ip, port} on boot so DualIp.reply_from/3 can resolve the correct shard.

Internal note

Used as the child module for UDP listeners in Supervisor; not configured directly.

RFCs

Summary

Functions

Starts DatagramServer and registers {ip, port} in ListenRegistry.

Functions

start_link(opts)

Starts DatagramServer and registers {ip, port} in ListenRegistry.

Options are forwarded to DatagramServer.start_link/1; :transport is required.