Makes UDPMux IPv4/IPv6 aware

UDPMux before only worked with UDP4 traffic.
UDP6 traffic would simply be ignored.

This commit implements 2 connections per ufrag. When requesting a
connection for a ufrag the user must specify if they want IPv4 or IPv6.

Relates to pion/webrtc#1915
This commit is contained in:
Antoine Baché
2022-03-02 15:09:12 +01:00
committed by Antoine Baché
parent 427ac0fddb
commit 45ff379fd3
6 changed files with 72 additions and 39 deletions

View File

@@ -40,7 +40,7 @@ func TestUniversalUDPMux(t *testing.T) {
}
func testMuxSrflxConnection(t *testing.T, udpMux *UniversalUDPMuxDefault, ufrag string, network string) {
pktConn, err := udpMux.GetConn(ufrag)
pktConn, err := udpMux.GetConn(ufrag, false)
require.NoError(t, err, "error retrieving muxed connection for ufrag")
defer func() {
_ = pktConn.Close()