mirror of
https://github.com/pion/ice.git
synced 2025-10-05 23:47:01 +08:00
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:

committed by
Antoine Baché

parent
427ac0fddb
commit
45ff379fd3
@@ -65,7 +65,7 @@ func TestUDPMux(t *testing.T) {
|
||||
require.NoError(t, udpMux.Close())
|
||||
|
||||
// can't create more connections
|
||||
_, err = udpMux.GetConn("failufrag")
|
||||
_, err = udpMux.GetConn("failufrag", false)
|
||||
require.Error(t, err)
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ func TestAddressEncoding(t *testing.T) {
|
||||
}
|
||||
|
||||
func testMuxConnection(t *testing.T, udpMux *UDPMuxDefault, 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()
|
||||
|
Reference in New Issue
Block a user