Upgrade pion/ice to v2.0.0-rc.9

Add support for more stable ICE TCP API.
This commit is contained in:
Jerko Steiner
2020-08-01 08:37:51 +02:00
parent 18726f3478
commit cd3beeab24
8 changed files with 71 additions and 12 deletions

View File

@@ -3,9 +3,11 @@
package webrtc
import (
"net"
"testing"
"time"
"github.com/pion/transport/test"
"github.com/stretchr/testify/assert"
)
@@ -112,3 +114,28 @@ func TestSetReplayProtection(t *testing.T) {
t.Errorf("Failed to set SRTCP replay protection window")
}
}
func TestSettingEngine_SetICETCP(t *testing.T) {
report := test.CheckRoutines(t)
defer report()
listener, err := net.ListenTCP("tcp", &net.TCPAddr{})
if err != nil {
panic(err)
}
defer func() {
_ = listener.Close()
}()
tcpMux := NewICETCPMux(nil, listener, 8)
defer func() {
_ = tcpMux.Close()
}()
settingEngine := SettingEngine{}
settingEngine.SetICETCPMux(tcpMux)
assert.Equal(t, tcpMux, settingEngine.iceTCPMux)
}