Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MaxBindingRequests to SettingEngine #2661

Merged
merged 1 commit into from
Feb 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions icegatherer.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ func (g *ICEGatherer) createAgent() error {
UDPMux: g.api.settingEngine.iceUDPMux,
ProxyDialer: g.api.settingEngine.iceProxyDialer,
DisableActiveTCP: g.api.settingEngine.iceDisableActiveTCP,
MaxBindingRequests: g.api.settingEngine.iceMaxBindingRequests,
}

requestedNetworkTypes := g.api.settingEngine.candidates.ICENetworkTypes
Expand Down
7 changes: 7 additions & 0 deletions settingengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
disableMediaEngineCopy bool
srtpProtectionProfiles []dtls.SRTPProtectionProfile
receiveMTU uint
iceMaxBindingRequests *uint16
}

// getReceiveMTU returns the configured MTU. If SettingEngine's MTU is configured to 0 it returns the default
Expand Down Expand Up @@ -340,6 +341,12 @@
e.iceProxyDialer = d
}

// SetICEMaxBindingRequests sets the maximum amount of binding requests
// that can be sent on a candidate before it is considered invalid.
func (e *SettingEngine) SetICEMaxBindingRequests(d uint16) {
e.iceMaxBindingRequests = &d

Check warning on line 347 in settingengine.go

View check run for this annotation

Codecov / codecov/patch

settingengine.go#L346-L347

Added lines #L346 - L347 were not covered by tests
}

// DisableActiveTCP disables using active TCP for ICE. Active TCP is enabled by default
func (e *SettingEngine) DisableActiveTCP(isDisabled bool) {
e.iceDisableActiveTCP = isDisabled
Expand Down