Skip to content

Commit

Permalink
Expose STUNGatherTimeout via SettingEngine
Browse files Browse the repository at this point in the history
Resolves #2668
  • Loading branch information
stephanrotolante authored and Sean-Der committed Apr 3, 2024
1 parent 9e25881 commit b8fcf99
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.19
require (
github.com/pion/datachannel v1.5.6
github.com/pion/dtls/v2 v2.2.10
github.com/pion/ice/v3 v3.0.4
github.com/pion/ice/v3 v3.0.5
github.com/pion/interceptor v0.1.27
github.com/pion/logging v0.2.2
github.com/pion/randutil v0.1.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ github.com/pion/datachannel v1.5.6/go.mod h1:1eKT6Q85pRnr2mHiWHxJwO50SfZRtWHTsNI
github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s=
github.com/pion/dtls/v2 v2.2.10 h1:u2Axk+FyIR1VFTPurktB+1zoEPGIW3bmyj3LEFrXjAA=
github.com/pion/dtls/v2 v2.2.10/go.mod h1:d9SYc9fch0CqK90mRk1dC7AkzzpwJj6u2GU3u+9pqFE=
github.com/pion/ice/v3 v3.0.4 h1:TqEdK0nWHm3vs76Rvgd7dpDKhGzagtZ7u+kt0b9ed/s=
github.com/pion/ice/v3 v3.0.4/go.mod h1:GIQiugpGkBDvh18nhFLRoHgabZ9VSRJOaEPh1nHjdrs=
github.com/pion/ice/v3 v3.0.5 h1:V6tNvpGS/vNJBWh3BEzQrwiPncOmLx7jbbSJM/2PFHE=
github.com/pion/ice/v3 v3.0.5/go.mod h1:GIQiugpGkBDvh18nhFLRoHgabZ9VSRJOaEPh1nHjdrs=
github.com/pion/interceptor v0.1.27 h1:mZ01OiGiukwRxezmDGzYjjokCVlDOk4T6BfaL5qrtGo=
github.com/pion/interceptor v0.1.27/go.mod h1:/vVaqLwDjGv4GRbgmChIKZIT5EXFDijwmj4WmIYy9bI=
github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
Expand Down
1 change: 1 addition & 0 deletions icegatherer.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ func (g *ICEGatherer) createAgent() error {
SrflxAcceptanceMinWait: g.api.settingEngine.timeout.ICESrflxAcceptanceMinWait,
PrflxAcceptanceMinWait: g.api.settingEngine.timeout.ICEPrflxAcceptanceMinWait,
RelayAcceptanceMinWait: g.api.settingEngine.timeout.ICERelayAcceptanceMinWait,
STUNGatherTimeout: g.api.settingEngine.timeout.ICESTUNGatherTimeout,
InterfaceFilter: g.api.settingEngine.candidates.InterfaceFilter,
IPFilter: g.api.settingEngine.candidates.IPFilter,
NAT1To1IPs: g.api.settingEngine.candidates.NAT1To1IPs,
Expand Down
6 changes: 6 additions & 0 deletions settingengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ type SettingEngine struct {
ICESrflxAcceptanceMinWait *time.Duration
ICEPrflxAcceptanceMinWait *time.Duration
ICERelayAcceptanceMinWait *time.Duration
ICESTUNGatherTimeout *time.Duration
}
candidates struct {
ICELite bool
Expand Down Expand Up @@ -157,6 +158,11 @@ func (e *SettingEngine) SetRelayAcceptanceMinWait(t time.Duration) {
e.timeout.ICERelayAcceptanceMinWait = &t
}

// SetSTUNGatherTimeout sets the ICESTUNGatherTimeout
func (e *SettingEngine) SetSTUNGatherTimeout(t time.Duration) {
e.timeout.ICESTUNGatherTimeout = &t
}

// SetEphemeralUDPPortRange limits the pool of ephemeral ports that
// ICE UDP connections can allocate from. This affects both host candidates,
// and the local address of server reflexive candidates.
Expand Down

0 comments on commit b8fcf99

Please sign in to comment.