Move URL type to pion/stun.URI

This commit is contained in:
Steffen Vogel
2023-05-10 12:45:24 +02:00
parent 6c82312fcd
commit ca9de18fd6
16 changed files with 153 additions and 377 deletions

View File

@@ -301,11 +301,11 @@ func TestConnectivityLite(t *testing.T) {
lim := test.TimeOut(time.Second * 30)
defer lim.Stop()
stunServerURL := &URL{
stunServerURL := &stun.URI{
Scheme: SchemeTypeSTUN,
Host: "1.2.3.4",
Port: 3478,
Proto: ProtoTypeUDP,
Proto: stun.ProtoTypeUDP,
}
natType := &vnet.NATType{
@@ -320,7 +320,7 @@ func TestConnectivityLite(t *testing.T) {
bNotifier, bConnected := onConnected()
cfg0 := &AgentConfig{
Urls: []*URL{stunServerURL},
Urls: []*stun.URI{stunServerURL},
NetworkTypes: supportedNetworkTypes(),
MulticastDNSMode: MulticastDNSModeDisabled,
Net: v.net0,
@@ -331,7 +331,7 @@ func TestConnectivityLite(t *testing.T) {
require.NoError(t, aAgent.OnConnectionStateChange(aNotifier))
cfg1 := &AgentConfig{
Urls: []*URL{},
Urls: []*stun.URI{},
Lite: true,
CandidateTypes: []CandidateType{CandidateTypeHost},
NetworkTypes: supportedNetworkTypes(),
@@ -548,7 +548,7 @@ func TestConnectionStateCallback(t *testing.T) {
KeepaliveInterval := time.Duration(0)
cfg := &AgentConfig{
Urls: []*URL{},
Urls: []*stun.URI{},
NetworkTypes: supportedNetworkTypes(),
DisconnectedTimeout: &disconnectedDuration,
FailedTimeout: &failedDuration,
@@ -1330,7 +1330,7 @@ func TestCloseInConnectionStateCallback(t *testing.T) {
CheckInterval := 500 * time.Millisecond
cfg := &AgentConfig{
Urls: []*URL{},
Urls: []*stun.URI{},
NetworkTypes: supportedNetworkTypes(),
DisconnectedTimeout: &disconnectedDuration,
FailedTimeout: &failedDuration,
@@ -1382,7 +1382,7 @@ func TestRunTaskInConnectionStateCallback(t *testing.T) {
CheckInterval := 50 * time.Millisecond
cfg := &AgentConfig{
Urls: []*URL{},
Urls: []*stun.URI{},
NetworkTypes: supportedNetworkTypes(),
DisconnectedTimeout: &oneSecond,
FailedTimeout: &oneSecond,
@@ -1427,7 +1427,7 @@ func TestRunTaskInSelectedCandidatePairChangeCallback(t *testing.T) {
CheckInterval := 50 * time.Millisecond
cfg := &AgentConfig{
Urls: []*URL{},
Urls: []*stun.URI{},
NetworkTypes: supportedNetworkTypes(),
DisconnectedTimeout: &oneSecond,
FailedTimeout: &oneSecond,