mirror of
https://github.com/pion/webrtc.git
synced 2025-10-25 08:10:37 +08:00
Upgrade pion/ice to v2.0.0-rc.9
Add support for more stable ICE TCP API.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user