Description
The roadmap suggests using quic-go and pion/ice simultaneously. These libraries will compete for the same UDP socket.
Technical Flaw
Both libraries expect to call ReadFrom on the UDP socket. If pion/ice consumes a STUN binding request packet, quic-go will never see it, and vice versa. Standard Go net.UDPConn does not support multiple listeners.
Proposed Fix
Implement a UDP demuxer (shim) that:
- Binds to the UDP port.
- Inspects the first few bytes of incoming packets.
- Routes STUN/ICE packets to
pion/ice and QUIC packets to quic-go based on the header bits.
Description
The roadmap suggests using
quic-goandpion/icesimultaneously. These libraries will compete for the same UDP socket.Technical Flaw
Both libraries expect to call
ReadFromon the UDP socket. Ifpion/iceconsumes a STUN binding request packet,quic-gowill never see it, and vice versa. Standard Gonet.UDPConndoes not support multiple listeners.Proposed Fix
Implement a UDP demuxer (shim) that:
pion/iceand QUIC packets toquic-gobased on the header bits.