mirror of
https://github.com/pion/webrtc.git
synced 2025-10-04 06:46:35 +08:00
Bump pion/ice
SettingEngine now allows setting static MulticastDNS HostName
This commit is contained in:
2
go.mod
2
go.mod
@@ -5,7 +5,7 @@ go 1.12
|
|||||||
require (
|
require (
|
||||||
github.com/pion/datachannel v1.4.13
|
github.com/pion/datachannel v1.4.13
|
||||||
github.com/pion/dtls/v2 v2.0.0-rc.3
|
github.com/pion/dtls/v2 v2.0.0-rc.3
|
||||||
github.com/pion/ice v0.7.3
|
github.com/pion/ice v0.7.4
|
||||||
github.com/pion/logging v0.2.2
|
github.com/pion/logging v0.2.2
|
||||||
github.com/pion/quic v0.1.1
|
github.com/pion/quic v0.1.1
|
||||||
github.com/pion/rtcp v1.2.1
|
github.com/pion/rtcp v1.2.1
|
||||||
|
4
go.sum
4
go.sum
@@ -29,8 +29,8 @@ github.com/pion/datachannel v1.4.13 h1:ezTn3AtUtXvKemRRjRdUgao/T8bH4ZJwrpOqU8Iz3
|
|||||||
github.com/pion/datachannel v1.4.13/go.mod h1:+rBUwEDonA63KXx994DP/ofyyGVAm6AIMvOqQZxjWRU=
|
github.com/pion/datachannel v1.4.13/go.mod h1:+rBUwEDonA63KXx994DP/ofyyGVAm6AIMvOqQZxjWRU=
|
||||||
github.com/pion/dtls/v2 v2.0.0-rc.3 h1:u9utI+EDJOjOWfrkGQsD8WNssPcTwfYIanFB6oI8K+4=
|
github.com/pion/dtls/v2 v2.0.0-rc.3 h1:u9utI+EDJOjOWfrkGQsD8WNssPcTwfYIanFB6oI8K+4=
|
||||||
github.com/pion/dtls/v2 v2.0.0-rc.3/go.mod h1:x0XH+cN5z+l/+/4nYL8r4sB8g6+0d1Zp2Pfkcoz8BKY=
|
github.com/pion/dtls/v2 v2.0.0-rc.3/go.mod h1:x0XH+cN5z+l/+/4nYL8r4sB8g6+0d1Zp2Pfkcoz8BKY=
|
||||||
github.com/pion/ice v0.7.3 h1:gZjzKHb1oEckNSLT/VFR4ZlDiATU+a54Ce4NcDnb20c=
|
github.com/pion/ice v0.7.4 h1:cwbduOII1hRb7ntoDAyXvEqGxALBVFk7PO4IbC9i/9A=
|
||||||
github.com/pion/ice v0.7.3/go.mod h1:V+ILxpsY3qtzJnvg9W3mLgQ37FkYfzM4ri0wX3VLzpM=
|
github.com/pion/ice v0.7.4/go.mod h1:V+ILxpsY3qtzJnvg9W3mLgQ37FkYfzM4ri0wX3VLzpM=
|
||||||
github.com/pion/logging v0.2.1/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
|
github.com/pion/logging v0.2.1/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
|
||||||
github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
|
github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
|
||||||
github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
|
github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
|
||||||
|
@@ -103,6 +103,7 @@ func (g *ICEGatherer) createAgent() error {
|
|||||||
NAT1To1IPCandidateType: nat1To1CandiTyp,
|
NAT1To1IPCandidateType: nat1To1CandiTyp,
|
||||||
Net: g.api.settingEngine.vnet,
|
Net: g.api.settingEngine.vnet,
|
||||||
MulticastDNSMode: multicastDNSMode,
|
MulticastDNSMode: multicastDNSMode,
|
||||||
|
MulticastDNSHostName: g.api.settingEngine.candidates.MulticastDNSHostName,
|
||||||
}
|
}
|
||||||
|
|
||||||
requestedNetworkTypes := g.api.settingEngine.candidates.ICENetworkTypes
|
requestedNetworkTypes := g.api.settingEngine.candidates.ICENetworkTypes
|
||||||
|
@@ -39,6 +39,7 @@ type SettingEngine struct {
|
|||||||
NAT1To1IPs []string
|
NAT1To1IPs []string
|
||||||
NAT1To1IPCandidateType ICECandidateType
|
NAT1To1IPCandidateType ICECandidateType
|
||||||
GenerateMulticastDNSCandidates bool
|
GenerateMulticastDNSCandidates bool
|
||||||
|
MulticastDNSHostName string
|
||||||
}
|
}
|
||||||
answeringDTLSRole DTLSRole
|
answeringDTLSRole DTLSRole
|
||||||
vnet *vnet.Net
|
vnet *vnet.Net
|
||||||
@@ -176,7 +177,15 @@ func (e *SettingEngine) SetVNet(vnet *vnet.Net) {
|
|||||||
e.vnet = vnet
|
e.vnet = vnet
|
||||||
}
|
}
|
||||||
|
|
||||||
// GenerateMulticastDNSCandidates pion/ice to generate host candidates with mDNS names instead of IP Addresses
|
// GenerateMulticastDNSCandidates instructs pion/ice to generate host candidates with mDNS hostnames instead of IP Addresses
|
||||||
func (e *SettingEngine) GenerateMulticastDNSCandidates(generateMulticastDNSCandidates bool) {
|
func (e *SettingEngine) GenerateMulticastDNSCandidates(generateMulticastDNSCandidates bool) {
|
||||||
e.candidates.GenerateMulticastDNSCandidates = generateMulticastDNSCandidates
|
e.candidates.GenerateMulticastDNSCandidates = generateMulticastDNSCandidates
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetMulticastDNSHostName sets a static HostName to be used by pion/ice instead of generating one on startup
|
||||||
|
//
|
||||||
|
// This should only be used for a single PeerConnection. Having multiple PeerConnections with the same HostName will cause
|
||||||
|
// undefined behavior
|
||||||
|
func (e *SettingEngine) SetMulticastDNSHostName(hostName string) {
|
||||||
|
e.candidates.MulticastDNSHostName = hostName
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user