Patches Erlang/OTP's DTLS packet demux so XGW can share one UDP socket.
Why a patch is needed
Stock OTP DTLS assumes each connection owns a private :gen_udp socket.
XGW deliberately multiplexes STUN, DTLS, and SRTP on one Listener socket
(standard WebRTC demux). Outbound DTLS must therefore call
XGW.DTLS.Transport instead of :gen_udp.send/4.
At application start, patch!/0 loads a drop-in dtls_packet_demux BEAM from
XGW's ebin when present. If the file is missing, startup continues with
stock OTP (suitable for environments that do not run shared-socket DTLS).
RFCs
- RFC 7983 -- WebRTC demux model that motivates a shared UDP socket
- RFC 9147 / RFC 6347 -- DTLS (OTP connection that must send on that socket)