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

Function WithRemoteIPFilter

agent_options.go:502–512  ·  view source on GitHub ↗

WithRemoteIPFilter sets a filter for remote candidate IP addresses. Candidates for which this function returns false are ignored.

(filter func(net.IP) bool)

Source from the content-addressed store, hash-verified

500// WithRemoteIPFilter sets a filter for remote candidate IP addresses.
501// Candidates for which this function returns false are ignored.
502func WithRemoteIPFilter(filter func(net.IP) bool) AgentOption {
503 return func(a *Agent) error {
504 if a.constructed {
505 return ErrAgentOptionNotUpdatable
506 }
507
508 a.remoteIPFilter = filter
509
510 return nil
511 }
512}
513
514// WithNet sets the underlying network implementation for the agent.
515func WithNet(net transport.Net) AgentOption {

Callers 3

TestAgentUpdateOptionsFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestAgentUpdateOptionsFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…