mirror of
https://github.com/pion/webrtc.git
synced 2025-10-05 15:16:52 +08:00

committed by
Michiel De Backker

parent
4b32aceba6
commit
ae0a2a075f
@@ -4,6 +4,9 @@ import "github.com/pions/webrtc/pkg/ice"
|
|||||||
|
|
||||||
var defaultSettingEngine = newSettingEngine()
|
var defaultSettingEngine = newSettingEngine()
|
||||||
|
|
||||||
|
// settingEngine allows influencing behavior in ways that are not
|
||||||
|
// supported by the WebRTC API. This allows us to support additional
|
||||||
|
// use-cases without deviating from the WebRTC API elsewhere.
|
||||||
type settingEngine struct {
|
type settingEngine struct {
|
||||||
EphemeralUDP struct {
|
EphemeralUDP struct {
|
||||||
PortMin uint16
|
PortMin uint16
|
||||||
@@ -12,7 +15,8 @@ type settingEngine struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SetEphemeralUDPPortRange limits the pool of ephemeral ports that
|
// SetEphemeralUDPPortRange limits the pool of ephemeral ports that
|
||||||
// ICE UDP connections can allocate from
|
// ICE UDP connections can allocate from. This setting currently only
|
||||||
|
// affects host candidates, not server reflexive candidates.
|
||||||
func SetEphemeralUDPPortRange(portMin, portMax uint16) error {
|
func SetEphemeralUDPPortRange(portMin, portMax uint16) error {
|
||||||
if portMax < portMin {
|
if portMax < portMin {
|
||||||
return ice.ErrPort
|
return ice.ErrPort
|
||||||
|
Reference in New Issue
Block a user