MCPcopy Create free account
hub / github.com/pion/ice / WithIPFilter

Function WithIPFilter

agent_options.go:488–498  ·  view source on GitHub ↗

WithIPFilter sets a filter for IP addresses used during candidate gathering.

(filter func(net.IP) bool)

Source from the content-addressed store, hash-verified

486
487// WithIPFilter sets a filter for IP addresses used during candidate gathering.
488func WithIPFilter(filter func(net.IP) bool) AgentOption {
489 return func(a *Agent) error {
490 if a.constructed {
491 return ErrAgentOptionNotUpdatable
492 }
493
494 a.ipFilter = filter
495
496 return nil
497 }
498}
499
500// WithRemoteIPFilter sets a filter for remote candidate IP addresses.
501// Candidates for which this function returns false are ignored.

Callers 2

TestAgentUpdateOptionsFunction · 0.85
TestWithIPFilterOptionFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestAgentUpdateOptionsFunction · 0.68
TestWithIPFilterOptionFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…