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

Function WithInterfaceFilter

agent_options.go:998–1008  ·  view source on GitHub ↗

WithInterfaceFilter sets a filter function to whitelist or blacklist network interfaces for ICE candidate gathering. The filter function receives the interface name and should return true to keep the interface, or false to exclude it. Example: // Only use interfaces starting with "eth" agent, e

(filter func(string) bool)

Source from the content-addressed store, hash-verified

996// }),
997// )
998func WithInterfaceFilter(filter func(string) bool) AgentOption {
999 return func(a *Agent) error {
1000 if a.constructed {
1001 return ErrAgentOptionNotUpdatable
1002 }
1003
1004 a.interfaceFilter = filter
1005
1006 return nil
1007 }
1008}
1009
1010// WithLoggerFactory sets the logger factory for the agent.
1011//

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…